Hello guys!!! when you press the key that you put in the script, time will slow down depending on the time you write in the script.Enjoy!
Last edited by developer23 on Sat Jun 21, 2014 2:34 am; edited 1 time in total
Code:
function Update () {
if (Input.GetKeyDown (KeyCode.E)) {
if (Time.timeScale == 1.0)
Time.timeScale = 0.4;
else
Time.timeScale = 1.0;
Time.fixedDeltaTime = 0.02 * Time.timeScale;
}
}
Last edited by developer23 on Sat Jun 21, 2014 2:34 am; edited 1 time in total