scorebored / scorebored-2-alpha

Scorebored, Version 2
MIT License
1 stars 0 forks source link

Timer #10

Closed mike-mcgann closed 10 years ago

mike-mcgann commented 10 years ago

Add in a timer for keeping track of how much time has elapsed in the match.

game.timer.start(); // Starts the timer
game.timer.stop(); // Pauses the timer
game.timer.elapsed(); // Elapsed time in the match in milliseconds.
game.timer.running // True if running
game.timer.reset(); // Go back to zero
mike-mcgann commented 10 years ago

Timer is is. See Controller.js (which is now in a separate example directory).

The pong engine takes care of the following:

chugcup commented 10 years ago

Implemented the UI portion of the clock. Also fired a "timerStart" event when reset() is called and the clock continues running.