Пример #1
0
 public void Remove <T>() where T : Component
 {
     if (Components.ContainsKey(typeof(T)))
     {
         Component component = Components[typeof(T)];
         Components.Remove(typeof(T));
         if (component is IUpdateable)
         {
             Updatables.Remove(component as IUpdateable);
         }
         if (component is IRenderable)
         {
             Renderables.Remove(component as IRenderable);
         }
         if (component is IDrawable)
         {
             Drawables.Remove(component as IDrawable);
         }
     }
 }
Пример #2
0
 public virtual void Die()
 {
     Updatables.Remove(this);
 }
Пример #3
0
 public override void Die()
 {
     Updatables.Remove(this);
     Drawables.Remove(this);
 }