public void AddComponent(IComponent component) { if (this.EditorEnabled || component.Entity == null || component.Entity.CannotSuspend) component.Suspended.Value = false; component.SetMain(this); if (typeof(IGraphicsComponent).IsAssignableFrom(component.GetType())) ((IGraphicsComponent)component).LoadContent(false); component.Awake(); this.componentsToAdd.Add(component); }
public void AddComponent(IComponent component) { if (this.EditorEnabled || component.Entity == null || component.Entity.CannotSuspend) { component.Suspended.Value = false; } component.SetMain(this); if (typeof(IGraphicsComponent).IsAssignableFrom(component.GetType())) { ((IGraphicsComponent)component).LoadContent(false); } component.Awake(); this.componentsToAdd.Add(component); }
public void RegisterComponent(IComponent component) { components.Add(component); component.Awake(); }