Beispiel #1
0
 public float GetPathfindingCost()
 {
     if (entityOnTile == null)
     {
         if (tileEntityType == TileEntityType.boss)
         {
             return(0f);
         }
         return(1f); // Empty tile.
     }
     else
     {
         float mult = 1f; // multiplier from terrain
         if (terrainOnTile != null)
         {
             mult = terrainOnTile.GetPathfindingCost();
         }
         return(entityOnTile.GetPathfindingCost() * mult);
     }
 }