Beispiel #1
0
        public void Destroy()
        {
            World.AddFrameEndTask(w =>
            {
                if (Destroyed)
                {
                    return;
                }

                if (IsInWorld)
                {
                    World.Remove(this);
                }

                World.traitDict.RemoveActor(this);
                Destroyed = true;

                if (luaInterface != null)
                {
                    luaInterface.Value.OnActorDestroyed();
                }
            });
        }