I want to pause 15 seconds then resume without any input when an object is collision other object this is my code but not working. Thank you
void Start(){
Eifftower = GameObject.FindGameObjectWithTag ("eiffeldespration");
Eifftower.renderer.enabled = false;
Time.timeScale = 1;
}
IEnumerator wait() {
yield return new WaitForSeconds(15f);
Eifftower.renderer.enabled = false;
Time.timeScale = 1;
Debug.Log("test");
}
void OnTriggerEnter2D(Collider2D collisionObject){
//remove the game object
if (collisionObject.tag == "Franch" ) {
Eifftower.renderer.enabled = true;
Time.timeScale = 1;
StartCoroutine(test1());
}
}