void OnTriggerEnter(Collider col) { for (int i = 0; i < tagNames.Length; i++) { if (col.gameObject.tag == tagNames[i]) { destroyableObj.die(); } } }
void Update() { if (Input.GetKey(restart)) { SceneManager.LoadScene(SceneManager.GetActiveScene().name); } if (Input.GetKey(explode)) { player.die(); } if (Input.GetKey(spawning) && spawnActivator) { StartCoroutine(spawn(spawner)); } if (Input.GetKey(KeyCode.Escape)) { Application.Quit(); } }