* update the game world * @param {number} dt - the time passed since the last frame update * @returns {boolean} true if the world is dirty
(dt)
| 318 | * @returns {boolean} true if the world is dirty |
| 319 | */ |
| 320 | update(dt) { |
| 321 | // only update the quadtree if necessary |
| 322 | if (this.physic === "builtin" || hasRegisteredEvents() === true) { |
| 323 | // clear the quadtree |
| 324 | this.broadphase.clear(); |
| 325 | // insert the world container (children) into the quadtree |
| 326 | this.broadphase.insertContainer(this); |
| 327 | } |
| 328 | |
| 329 | // advance the active adapter's simulation |
| 330 | this.step(dt); |
| 331 | |
| 332 | // call the super constructor |
| 333 | return super.update(dt); |
| 334 | } |
| 335 | |
| 336 | /** |
| 337 | * update the physics simulation by one step (called by the game world update method) |
nothing calls this directly
no test coverage detected