basic enemy movement
This commit is contained in:
parent
46d2b7bc95
commit
fd8778e9f2
6 changed files with 377 additions and 15 deletions
|
|
@ -11,11 +11,14 @@ public class Enemy : Entity
|
|||
turnSpeed = Random.Range(0, 100);
|
||||
}
|
||||
|
||||
[ContextMenu("ForceTurn")]
|
||||
public void StartTurn()
|
||||
{
|
||||
//attack the nearest player?
|
||||
TurnHandler.instance.UpdateTurns();
|
||||
closestPlayer = FindClosestPlayer();
|
||||
Debug.Log(closestPlayer);
|
||||
EnemyMovement.instance.PathfindToTarget(closestPlayer.currentTile.neighbors[Random.Range(0, closestPlayer.currentTile.neighbors.Count)], this);
|
||||
}
|
||||
|
||||
private PlayerEntity FindClosestPlayer()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue