예제 #1
0
        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);
        }
예제 #2
0
        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;
            }
        }