void OnEnable() { if (Prefab_Tower != null) { _poolTowers.Initialize(this.transform, Prefab_Tower, 0); } InputServer.SINGLETON.OnTouchCollider += OnTouchCollider; }
void OnEnable() { if (Prefab_Foe != null) { DLMKPool.GameObjectPool poolFoes = new DLMKPool.GameObjectPool(); poolFoes.Initialize(this.transform, Prefab_Foe, 5); _pools.Add(poolFoes); DLMKPool.GameObjectPool foesZigZagPool = new DLMKPool.GameObjectPool(); foesZigZagPool.Initialize(this.transform, Prefab_Foe_Zigzag, 5); _pools.Add(foesZigZagPool); Invoke("mSpawnFoe", TimeToSpawnAFoe()); } }