public override void Apply() { foreach (var item in _cleaned) { var pos = item.transform.position; switch (item.tag) { case Tags.Tree: Tree.RemoveFromMap(pos); break; case Tags.Home: Home.RemoveFromMap(pos); break; case Tags.Street: Street.RemoveFromMap(pos); break; case Tags.Clinic: Clinic.RemoveFromMap(pos); break; case Tags.Hospital: Hospital.RemoveFromMap(pos); break; case Tags.HighSchool: HighSchool.RemoveFromMap(pos); break; case Tags.FirstAidPost: FirstAidPost.RemoveFromMap(pos); break; case Tags.PoliceStation: PoliceStation.RemoveFromMap(pos); break; case Tags.SecurityCabin: SecurityCabin.RemoveFromMap(pos); break; } Object.Destroy(item); } }
public override void OnMoved(GridCell cell) { _currentProject.transform.position = cell.center; CommonModels.InfluenceObj.transform.position = cell.center; switch (_type) { case EducationBuilding.School: Building.SetRenderer(_currentProject, HighSchool.IsBuildable(cell)); break; case EducationBuilding.University: Building.SetRenderer(_currentProject, University.IsBuildable(cell)); break; case EducationBuilding.DayCarePost: Building.SetRenderer(_currentProject, DayCarePost.IsBuildable(cell)); break; } }
public override void Apply() { var pos = _currentProject.transform.position; switch (_type) { case EducationBuilding.School: HighSchool.SetOnMap(pos); break; case EducationBuilding.University: University.SetOnMap(pos); break; case EducationBuilding.DayCarePost: DayCarePost.SetOnMap(pos); break; } Clean(); }