public GameObject GetEnemy(Enums.EnemyTypes type) { IPoolable entity = AllocateEntity(enemyPools[(int)type]); if (entity == null) { return(null); } return(entity.GetGameObject()); }
public void ReturnEnemy(Enums.EnemyTypes type, GameObject enemy) { IPoolable entity = enemy.GetComponent <IPoolable>(); DeallocateEntity(enemyPools[(int)type], entity); }