Norex wrote:developer23 wrote: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!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;
}
}
Is this script used in C# or JavaScript?
JavaScript