Example #1
0
        public GameObject GetEnemy(Enums.EnemyTypes type)
        {
            IPoolable entity = AllocateEntity(enemyPools[(int)type]);

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

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

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