示例#1
0
 public bool checkTileContainsEnemy(Tile tile)
 {
     if (tile.getCurrentEntity() != null && tile.getCurrentEntity().entityType != entity.entityType)
     {
         return true;
     }
     return false;
 }
示例#2
0
 public bool checkTileContainsObstacle(Tile tile) 
 {
     if (tile.getCurrentEntity() == null)
     {
         return false;
     }
     if (tile.getCurrentEntity().entityType == Tile.NEUTRAL)
     {
         return true;
     }
     return false;
 }
示例#3
0
    public bool checkTileContainsFriendly(Tile tile)
    {
        if (tile.getCurrentEntity() == null)
        {
            return false;
        }
        if (tile.getCurrentEntity().entityType == entity.entityType)
        {
            return true;
        }
        return false;

    }
示例#4
0
 public void addAffectedTile(Tile tile)
 {
     alteredTiles.Add(tile);
     oldTileState.Add(tile.getCurrentTileType());
     alteredEntities.Add(tile.getCurrentEntity());
 }
示例#5
0
 public bool checkTileContainsEntity(Tile t)
 {
     return t.getCurrentEntity() != null;
 }
示例#6
0
 void checkKillEnemy(Tile tile)
 {
     Entity entity = tile.getCurrentEntity();
     if (entity == null)
     {
         return;
     }
     if (entity.entityType == currentEntity.entityType)
     {
         return;
     }
     if (entity.entityType == Tile.NEUTRAL)
     {
         return;
     }
     entity.takeDamage();
 }