protected bool BuildWall(Vector2 position) { return(GameState.Current.IsValidBuildingPlace(mPlayerId, position, UnitTypes.Wall, 0f) && Costs.HasEnoughResourcesForUnit(UnitTypes.Wall, mPlayerId) && Costs.PayUnitCosts(UnitTypes.Wall, mPlayerId) && GameState.Current.AddBuilding( mPlayerId, position, UnitTypes.Wall)); }
protected bool BuildGate(Vector2 position, float rotation) { return(GameState.Current.IsValidBuildingPlace(mPlayerId, position, UnitTypes.Gate, rotation) && Costs.HasEnoughResourcesForUnit(UnitTypes.Gate, mPlayerId) && Costs.PayUnitCosts(UnitTypes.Gate, mPlayerId) && GameState.Current.AddBuilding( mPlayerId, position, UnitTypes.Gate, rotation)); }