Exemplo n.º 1
0
 private async Task <bool> MoveToNeighbourTile(Tile tile, bool findEnemies)
 {
     if (tile.IsAccessible) //TODO other conditions
     {
         if (await MoveThroughSpaces(tile, findEnemies))
         {
             if (!hounting && !gettingHome)
             {
                 watchAroundArea.SetBundle(tile, watchAroundArea.GetBundle(tile) + 1);
             }
             return(true);
         }
         else
         {
             return(false);
         }
     }
     return(false);
 }
Exemplo n.º 2
0
 protected virtual async Task <bool> MoveToNeighbourTile(ITile tile, bool findEnemies)
 {
     if (tile.IsAccessible && !tile.IsDangerous)
     {
         //move was successful and no teleporation occurred afterwards
         if (await MoveThroughSpaces(tile, findEnemies) && Location == tile)
         {
             if (!hounting && !gettingHome)
             {
                 watchAroundArea.SetBundle(tile, watchAroundArea.GetBundle(tile) + 1);
             }
             return(true);
         }
         else
         {
             return(false);
         }
     }
     return(false);
 }