コード例 #1
0
        public IEntity CreateEntity(EntityBehaviour prefab)
        {
            Assert.IsNotNull(prefab);

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

            return entity.Entity;
        }
コード例 #2
0
        public IEntity CreateEntity(EntityBehaviour prefab)
        {
            Assert.IsNotNull(prefab);

            var entity = PrefabPoolManager.Create(prefab);

            entity.Initialize(this);

            return(entity.Entity);
        }
コード例 #3
0
        void InitializeHierarchyIfNeeded()
        {
            if (children != null)
            {
                return;
            }

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

            PopulateChildren(CachedTransform, childList);
            children = childList.ToArray();
        }
コード例 #4
0
        public void RecycleEntity(EntityBehaviour instance)
        {
            Assert.IsNotNull(instance);

            PrefabPoolManager.Recycle(instance);
        }
コード例 #5
0
        void InitializeHierarchyIfNeeded()
        {
            if (children != null)
                return;

            parent = CachedGameObject.GetComponentInParent<EntityBehaviour>(true);
            var childList = new List<EntityBehaviour>();
            PopulateChildren(CachedTransform, childList);
            children = childList.ToArray();
        }
コード例 #6
0
 public BehaviourComponent(EntityBehaviour behaviour)
 {
     Behaviour = behaviour;
 }
コード例 #7
0
        public void RecycleEntity(EntityBehaviour instance)
        {
            Assert.IsNotNull(instance);

            PrefabPoolManager.Recycle(instance);
        }