Example #1
0
        public GameObject GetTrap(Enums.Traps type)
        {
            IPoolable entity = AllocateEntity(trapPools[(int)type]);

            if (entity == null)
            {
                return(null);
            }

            return(entity.GetGameObject());
        }
Example #2
0
        public void ReturnTrap(Enums.Traps type, GameObject trap)
        {
            IPoolable entity = trap.GetComponent <IPoolable>();

            DeallocateEntity(trapPools[(int)type], entity);
        }