Ejemplo n.º 1
0
 public bool Remove(GameObject entity, Component component)
 {
     if (entity != null && component != null)
     {
         var components = GetComponentsForEntity(entity);
         if (components != null)
         {
             if (components.Count == 0)
             {
                 _injector.OnObjectDrop(entity);
                 _gameObjects.Remove(entity);
             }
             else
             {
                 EraseComponent(entity, component);
                 return(components.Remove(component.GetType()));
             }
         }
         return(false);
     }
     else
     {
         throw new ArgumentNullException();
     }
 }