Exemple #1
0
    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();
        }
    }
Exemple #2
0
 void OnDestroy()
 {
     EnemySpawner.Activate();
     Bgm.Play();
     Wall.Activate();
 }