コード例 #1
0
        private void ProcessNewPickups()
        {
            SkylinesOverwatch.Data data = SkylinesOverwatch.Data.Instance;

            foreach (ushort pickup in data.BuildingsUpdated)
            {
                if (data.IsLandfillSite(pickup))
                {
                    continue;
                }

                if (data.IsBuildingWithGarbage(pickup))
                {
                    foreach (ushort id in _landfills.Keys)
                    {
                        _landfills[id].AddPickup(pickup);
                    }
                }
                else
                {
                    foreach (ushort id in _landfills.Keys)
                    {
                        _landfills[id].AddCheckup(pickup);
                    }
                }
            }
        }
コード例 #2
0
        private void ProcessIdleGarbageTrucks()
        {
            SkylinesOverwatch.Data data = SkylinesOverwatch.Data.Instance;

            foreach (ushort x in data.BuildingsUpdated)
            {
                if (!data.IsLandfillSite(x))
                {
                    continue;
                }

                if (!_landfills.ContainsKey(x))
                {
                    continue;
                }

                _landfills[x].DispatchIdleVehicle();
            }
        }
コード例 #3
0
        private void ProcessNewLandfills()
        {
            SkylinesOverwatch.Data data = SkylinesOverwatch.Data.Instance;

            foreach (ushort x in data.BuildingsUpdated)
            {
                if (!data.IsLandfillSite(x))
                {
                    continue;
                }

                if (_landfills.ContainsKey(x))
                {
                    continue;
                }

                _landfills.Add(x, new Landfill(x, ref _master, ref _oldtargets, ref _lastchangetimes));

                foreach (ushort pickup in data.BuildingsWithGarbage)
                {
                    _landfills[x].AddPickup(pickup);
                }
            }
        }