* Prepare the thread for the next update cycle. * * @param dt - The delta time of the next cycle.
(dt: number)
| 150 | * @param dt - The delta time of the next cycle. |
| 151 | */ |
| 152 | public update(dt: number) { |
| 153 | if (!this.paused) { |
| 154 | this.time(this.time() + dt); |
| 155 | this.fixedTime += dt; |
| 156 | } |
| 157 | this.children = this.children.filter(child => !child.canceled); |
| 158 | } |
| 159 | |
| 160 | public spawn( |
| 161 | child: ThreadGenerator | (() => ThreadGenerator), |