Esempio n. 1
0
        protected override void OnDelete()
        {
            base.OnDelete();

            if (Altar != null)
            {
                Altar.Delete();
            }

            if (Vendor != null)
            {
                Vendor.Delete();
            }

            foreach (var b in Bosses.Where(b => b != null))
            {
                b.Delete();
            }

            foreach (var t in TeleportersTo.Union(TeleportersFrom).Where(t => t != null))
            {
                t.Delete();
            }

            foreach (var s in Floors.Where(l => l != null).SelectMany(l => l.Where(s => s != null)))
            {
                s.Delete();
            }

            foreach (var s in Stage.Where(s => s != null))
            {
                s.Delete();
            }
        }