- Home /
how do I make it so that my game only starts after the player presses Jump?
I'm not sure if this has been covered or not, but I need a way to make it so that my game doesn't start straight away, and only starts running once you press jump, and doesn't pause again after that. This is the code I have so far, the way it looks makes sense to me, but it doesn't seem to work in game, it doesn't even come up with errors in the console.
public void start () {
Time.timeScale = 0;
}
public void Update() {
if (Input.GetButtonDown ("Jump")) {
Time.timeScale = 1;
}
}
}
I'm new at coding so if this is more obvious than I think please don't hate.
Comment