internal void ReFreshComponent(IEnity enity, Type type, IComponent component) { EnityComponents comp = FindComponent(enity); if (comp == null) { throw new Exception("Not Exist Enity"); } comp.ReFreshComponent(type, component); }
internal IComponent GetComponent(IEnity enity, Type type) { EnityComponents comp = FindComponent(enity); if (comp == null) { throw new Exception("Not Exist Enity"); } return(comp.GetComponent(type)); }
internal IComponent AddComponent(IEnity enity, IComponent component) { EnityComponents comp = FindComponent(enity); if (comp == null) { throw new Exception("Not Exist Enity"); } return(comp.AddComponet(component)); }
internal void UnSubscribeEnity(IEnity enity) { EnityComponents comp = FindComponent(enity); if (comp == null) { throw new Exception("Not Exist Enity"); } comp.Dispose(); _enitys.Remove(enity); }