public override void Apply() { var pos = _currentProject.transform.position; switch (_type) { case SecurityBuilding.SecurityCabin: SecurityCabin.SetOnMap(pos); break; case SecurityBuilding.PoliceStation: PoliceStation.SetOnMap(pos); break; case SecurityBuilding.PoliceHeadquarters: PoliceHeadquarters.SetOnMap(pos); break; } Object.Destroy(_currentProject); }
public override void OnMoved(GridCell cell) { _currentProject.transform.position = cell.center; switch (_type) { case SecurityBuilding.SecurityCabin: Building.SetRenderer(_currentProject, SecurityCabin.IsBuildable(cell)); break; case SecurityBuilding.PoliceStation: Building.SetRenderer(_currentProject, PoliceStation.IsBuildable(cell)); break; case SecurityBuilding.PoliceHeadquarters: Building.SetRenderer(_currentProject, PoliceHeadquarters.IsBuildable(cell)); break; } }