Beispiel #1
0
        private void ProcessNewCemeteries()
        {
            SkylinesOverwatch.Data data = SkylinesOverwatch.Data.Instance;

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

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

                _cemeteries.Add(x, new Cemetery(x, ref _master));

                foreach (ushort pickup in data.BuildingsWithDead)
                {
                    foreach (ushort id in _cemeteries.Keys)
                    {
                        _cemeteries[id].AddPickup(pickup);
                    }
                }
            }
        }
        private void ProcessNewPickups()
        {
            SkylinesOverwatch.Data data = SkylinesOverwatch.Data.Instance;

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

                if (data.IsBuildingWithDead(pickup))
                {
                    foreach (ushort id in _cemeteries.Keys)
                    {
                        _cemeteries[id].AddPickup(pickup);
                    }
                }
                else
                {
                    foreach (ushort id in _cemeteries.Keys)
                    {
                        _cemeteries[id].AddCheckup(pickup);
                    }
                }
            }
        }