Beispiel #1
0
            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);
            }
Beispiel #2
0
            internal IComponent GetComponent(IEnity enity, Type type)
            {
                EnityComponents comp = FindComponent(enity);

                if (comp == null)
                {
                    throw new Exception("Not Exist Enity");
                }
                return(comp.GetComponent(type));
            }
Beispiel #3
0
            internal IComponent AddComponent(IEnity enity, IComponent component)
            {
                EnityComponents comp = FindComponent(enity);

                if (comp == null)
                {
                    throw new Exception("Not Exist Enity");
                }
                return(comp.AddComponet(component));
            }
Beispiel #4
0
            internal void UnSubscribeEnity(IEnity enity)
            {
                EnityComponents comp = FindComponent(enity);

                if (comp == null)
                {
                    throw new Exception("Not Exist Enity");
                }
                comp.Dispose();
                _enitys.Remove(enity);
            }