how can i pause my game with ONE click instead of keep pressing the space bar ??
i’m new to this so am pretty confused… this is the code
#pragma strict
var paused : boolean = false;
function Update () {
if (Input.GetButtonUp("Jump")){
if(!paused){
Time.timeScale = 0;
paused= true;
} else {
paused = false;
Time.timeScale = 1;
}
}
}