Ejemplo n.º 1
0
Archivo: Keep.cs Proyecto: MK4H/MHUrho
 public override bool CanBuild(IntVector2 topLeftTileIndex, IPlayer owner, ILevelManager level)
 {
     return(owner.GetBuildingsOfType(MyTypeInstance).Count == 0 &&
            level.Map
            .GetTilesInRectangle(MyTypeInstance.GetBuildingTilesRectangle(topLeftTileIndex))
            .All((tile) => tile.Building == null && tile.Units.Count == 0 && ViableTileTypes.IsViable(tile)) &&
            HeightDiffLow(topLeftTileIndex, MyTypeInstance.GetBottomRightTileIndex(topLeftTileIndex), level, MaxHeightDiff));
 }
Ejemplo n.º 2
0
 public override bool CanBuild(IntVector2 topLeftTileIndex, IPlayer owner, ILevelManager level)
 {
     return(level.Map
            .GetTilesInRectangle(MyTypeInstance.GetBuildingTilesRectangle(topLeftTileIndex))
            .All((tile) => tile.Building == null && tile.Units.Count == 0 && ViableTileTypes.IsViable(tile)));
 }