Exemple #1
0
 public Entity(ComponentCallBack componentCallBack, GetComponentFunc getFunc)
 {
     _id                      = Utils.GetEntityId();
     ChildList                = new List <Entity>();
     _allComponenArray        = new NormalComponent[ComponentIds.COMPONENT_MAX_COUNT];
     _changeComponentCallBack = componentCallBack;
     _getComponentFunc        = getFunc;
     _currentFlag             = new ComponentFlag();
 }
 public void Subscribe <T>(ComponentCallBack <MessageArgs> componentCallBack)
 {
     _registeredComponents.Add(new KeyValuePair <Type, ComponentCallBack <MessageArgs> >(typeof(T), componentCallBack));
 }