Beispiel #1
0
        public Entity AddViewObjectPool(Entitas.ObjectPool <UnityEngine.GameObject> newPool)
        {
            var component = CreateComponent <ViewObjectPoolComponent>(BulletsComponentIds.ViewObjectPool);

            component.pool = newPool;
            return(AddComponent(BulletsComponentIds.ViewObjectPool, component));
        }
Beispiel #2
0
        public Entity ReplaceViewObjectPool(Entitas.ObjectPool <UnityEngine.GameObject> newPool)
        {
            var component = CreateComponent <ViewObjectPoolComponent>(BulletsComponentIds.ViewObjectPool);

            component.pool = newPool;
            ReplaceComponent(BulletsComponentIds.ViewObjectPool, component);
            return(this);
        }