Ejemplo n.º 1
0
 public void GoTo(GridSpot destination, PlayGrid.MoveSet moveSet)
 {
     if(moveSet.GetPath(destination, ref currentPath))
     {
         turnRemainingMoves -= currentPath.Count;
         GlobalGameManager.Instance.OnBusyElement(this);
         StartPathStep();
     }
 }
Ejemplo n.º 2
0
 public bool TryAndMoveAI(PlayGrid.MoveSet moveSet)
 {
     if (turnRemainingMoves > 0)
     {
         FightCreature target = FightManager.instance.GetClosestOpponentCreature(this);
         if (target != null)
         {
             GridSpot destination = moveSet.GetClosestSpot(target.currentGridSpot, turnRemainingMoves);
             if (destination != currentGridSpot)
             {
                 GoTo(destination, moveSet);
                 return true;
             }
         }
     }
     return false;
 }