Closed define-private-public closed 6 years ago
As a note for future planning & features, with this object based Timer
, we could add in something so an Event (using the events
) module could be triggered after a certain amount of time has been reached.
As mentioned in a few commit comments and issue #21, the first round of the timer module looked a little wrong (e.g. it was giving us milliseconds for
deltaTime()
when it should have been giving us seconds instead). This commit fixes that and removes a little cruft.Under the hood all of the times are measured in hard integers, but the programmer is given a floating point interface to using the time.
On top of that, the timer module now has a
Timer
object. The rationale for this is two fold:Timer
less tied into the engine internals (i.e. independant).I've also added some documentation better explaining things. (I should maybe add some drawings too).
closes #21