Пример #1
0
        public override void Destroy()
        {
            if (!Destroyed)
            {
                if (this != Root)
                {
                    base.Destroy();

                    foreach (Entity ent in new List <Entity>(Childs))
                    {
                        ent.Destroy();
                    }

                    foreach (Component comp in new List <Component>(ChildComponents))
                    {
                        comp.Destroy();
                    }

                    Internals.DispatchDeleted(this);
                }
            }
        }