Reseting Timer Without Leaving Scene

I have a timer in my game that counts up and as the time rises the number of bonus points goes down. Anyway, I have a reset button in each scene and I need to reset the timer back to 0 when that button is pressed so that the bonus starts at the beginning again. I don't want to reload the scene, just set the timer back to 0.

I have two game attributes Start Time and My Timer.

At the beginning of each scene Start Time is set to game.time and My Timer is set to game.Time - game.Start Time.

Thanks.

Rich

Comments

Sign In or Register to comment.