Пример #1
0
        public override void Delete()
        {
            base.Delete();

            if (Beacon != null && !Beacon.Deleted)
            {
                Beacon.Delete();
            }

            for (var index = 0; index < Crew.Count; index++)
            {
                BaseCreature bc = Crew[index];

                if (bc != null && !bc.Deleted)
                {
                    bc.Kill();
                }
            }

            foreach (BaseCreature sp in Spawn.Keys)
            {
                if (sp != null && !sp.Deleted)
                {
                    sp.Kill();
                }
            }

            for (var index = 0; index < Cannons.Count; index++)
            {
                MannedCannon cannon = Cannons[index];

                cannon.Delete();
            }

            if (PlunderBeaconSpawner.Spawner != null)
            {
                PlunderBeaconSpawner.Spawner.RemovePlunderBeacon(this);
            }
        }