public bool checkTileContainsEnemy(Tile tile) { if (tile.getCurrentEntity() != null && tile.getCurrentEntity().entityType != entity.entityType) { return true; } return false; }
public bool checkTileContainsObstacle(Tile tile) { if (tile.getCurrentEntity() == null) { return false; } if (tile.getCurrentEntity().entityType == Tile.NEUTRAL) { return true; } return false; }
public bool checkTileContainsFriendly(Tile tile) { if (tile.getCurrentEntity() == null) { return false; } if (tile.getCurrentEntity().entityType == entity.entityType) { return true; } return false; }
public void addAffectedTile(Tile tile) { alteredTiles.Add(tile); oldTileState.Add(tile.getCurrentTileType()); alteredEntities.Add(tile.getCurrentEntity()); }
public bool checkTileContainsEntity(Tile t) { return t.getCurrentEntity() != null; }
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(); }