mirror of
https://github.com/photonstorm/phaser
synced 2024-12-22 19:13:37 +00:00
3e5a35d796
A note regarding the feature `startAt` of `TimerEvent ` When an event gets added it should be either scaled by clock `timeScale` as well or not scaled at all - depending on the feature purpose. ```javascript // preUpdate loop event.elapsed = event.startAt * event.timeScale ``` In my understanding it should not be influenced by `timeScale` at all. As a developer I would use the feature of `startAt` to specify the exact offset for my event. In case I have looped `Timer` for one second and want to start the first loop in the middle, I would set the `startAt` to half a second. And scaling is applied during the timer run time as a factor of speed it elapses. |
||
---|---|---|
.. | ||
Clock.js | ||
index.js | ||
TimerEvent.js |