예제 #1
0
파일: BaseMain.cs 프로젝트: dsmo7206/Lemma
		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);
		}
예제 #2
0
파일: BaseMain.cs 프로젝트: tammukul/Lemma
        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);
        }
예제 #3
0
 public void RegisterComponent(IComponent component)
 {
     components.Add(component);
     component.Awake();
 }