I am new to this, but I need help with a CSharp script. I need to collide with the desired object, pass the game to be 1.6 in TimeScale. After passing 8 seconds in the game, change back to 1 TimeScale, and try to call a Coroutine does not work. I really appreciate your help!
The code:
void TimeSet(){
Time.timeScale = 1.6f;
}
IEnumerator Normal (){
yield return new WaitForSeconds(8f);
Time.timeScale = 1f;
Debug.Log ("Ready");
}
void OnTriggerEnter2D(){
TimeSet ();
StartCoroutine ("Normal");
}