Example #1
0
        public virtual void Destroy()
        {
            for (var i = 0; i < Components.Count; i++)
            {
                var Component = Components[i];

                if (Component.GetType() == typeof(Collider))
                {
                    WorldCollision.RemoveCollider((Collider)Component);
                }

                if (Component.GetType() == typeof(Renderer))
                {
                    var Renderer = (Renderer)Component;

                    DrawableHandler.RemoveDrawable(Renderer.Drawable);
                }
            }

            World.RemoveEntity(this);
        }
Example #2
0
 private void ColliderOnMouseExit(object sender, EventArgs e)
 {
     DrawableHandler.RemoveDrawable(_text);
 }