private void OnTriggerEnter(Collider other) { Enemy enemy = other.GetComponent <Enemy>(); EnemySpawner spawner = other.GetComponent <EnemySpawner>(); // if(enemy != null){ // enemy.GetComponent<Movable>().CanMove = true; // enemy.Resume(); // enemy.gameObject.SetActive(true); // } if (spawner != null) { Debug.Log("Activating spawner " + other.gameObject.name); spawner.Activate(); } }
void OnDestroy() { EnemySpawner.Activate(); Bgm.Play(); Wall.Activate(); }