Example #1
0
        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);
            }
        }
Example #2
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);
        }
Example #3
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;
            }
        }