public void PoolEnemyObject(GameObject enemyGameObject) { //Debug.LogError("Pooling " + enemyGameObject.GetInstanceID() + enemyGameObject.GetComponent("Enemy").GetType()); enemyGameObject.SetActive(false); ActiveObjects.Remove(enemyGameObject); InactiveObjects.Add(enemyGameObject); }
public void PoolBullets(GameObject enemyGameObject) { enemyGameObject.SetActive(false); ActiveObjects.Remove(enemyGameObject); InactiveObjects.Add(enemyGameObject); }