コード例 #1
0
        //public void Generate(int[] persons) {
        //    _simulator.Generate(persons);
        //    UpdateTextLabels();
        //}

        // I don't want to use the increment slider for civic services, so this will
        // exclusively increment and decrement by 1
        private void IncrementBuildings()
        {
            int bldgType = (int)_sliderBldgType.value;

            _simulator.IncrementBuildings(1, bldgType);
            UpdateTextLabels();
        }
コード例 #2
0
        // I don't want to use the increment slider for civic services, so this will
        // exclusively increment and decrement by 1
        // This action can only be successfully performed if there is sufficient funds to do so
        private void IncrementBuildings()
        {
            int bldgType  = (int)_sliderBldgType.value;
            int bldgSeats = _simulator.ConstBuildingSeats[bldgType];

            if (_fundingMgr.ConstructCivic(bldgSeats, _simulator.CivicID))
            {
                _simulator.IncrementBuildings(1, bldgType);
                UpdateTextLabels();
            }
        }