Ejemplo n.º 1
0
		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);
		}
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public void RegisterComponent(IComponent component)
 {
     components.Add(component);
     component.Awake();
 }