public IEntity CreateEntity(EntityBehaviour prefab) { Assert.IsNotNull(prefab); var entity = PrefabPoolManager.Create(prefab); entity.Initialize(this); return entity.Entity; }
public IEntity CreateEntity(EntityBehaviour prefab) { Assert.IsNotNull(prefab); var entity = PrefabPoolManager.Create(prefab); entity.Initialize(this); return(entity.Entity); }
void InitializeHierarchyIfNeeded() { if (children != null) { return; } parent = CachedGameObject.GetComponentInParent <EntityBehaviour>(true); var childList = new List <EntityBehaviour>(); PopulateChildren(CachedTransform, childList); children = childList.ToArray(); }
public void RecycleEntity(EntityBehaviour instance) { Assert.IsNotNull(instance); PrefabPoolManager.Recycle(instance); }
void InitializeHierarchyIfNeeded() { if (children != null) return; parent = CachedGameObject.GetComponentInParent<EntityBehaviour>(true); var childList = new List<EntityBehaviour>(); PopulateChildren(CachedTransform, childList); children = childList.ToArray(); }
public BehaviourComponent(EntityBehaviour behaviour) { Behaviour = behaviour; }