* Updates content based on time passed. * This should be called every frame that the caption is active. * * @param {Number} deltaTime - Time in seconds since last frame. * @memberof Caption
(deltaTime)
| 54 | * @memberof Caption |
| 55 | */ |
| 56 | update(deltaTime) { |
| 57 | const time = this.time + deltaTime * 1000; |
| 58 | if (time === this.time) { |
| 59 | return; |
| 60 | } |
| 61 | |
| 62 | this.updateState(time, this.time); |
| 63 | this.time = time; |
| 64 | } |
| 65 | |
| 66 | /** |
| 67 | * Handles calling callbacks and updating caption's current state. |
no test coverage detected