public IEntity CreateEntity(EntityBehaviour prefab)
        {
            Assert.IsNotNull(prefab);

            var entity = PrefabPoolManager.Create(prefab);
            entity.Initialize(this);

            return entity.Entity;
        }
Exemple #2
0
        public IEntity CreateEntity(EntityBehaviour prefab)
        {
            Assert.IsNotNull(prefab);

            var entity = PrefabPoolManager.Create(prefab);

            entity.Initialize(this);

            return(entity.Entity);
        }
Exemple #3
0
        void InitializeHierarchyIfNeeded()
        {
            if (children != null)
            {
                return;
            }

            parent = CachedGameObject.GetComponentInParent <EntityBehaviour>(true);
            var childList = new List <EntityBehaviour>();

            PopulateChildren(CachedTransform, childList);
            children = childList.ToArray();
        }
Exemple #4
0
        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;
 }
        public void RecycleEntity(EntityBehaviour instance)
        {
            Assert.IsNotNull(instance);

            PrefabPoolManager.Recycle(instance);
        }