MCPcopy Create free account
hub / github.com/melonjs/melonJS / reset

Method reset

packages/melonjs/src/application/application.ts:603–615  ·  view source on GitHub ↗

* reset the game Object manager * destroy all current objects

()

Source from the content-addressed store, hash-verified

601 * destroy all current objects
602 */
603 reset(): void {
604 // point to the current active stage "default" camera
605 const current = state.get();
606 if (typeof current !== "undefined") {
607 this.viewport = current.cameras.get("default")!;
608 }
609
610 // publish reset notification
611 emit(GAME_RESET);
612
613 // Refresh internal variables for framerate limiting
614 this.updateFrameRate();
615 }
616
617 /**
618 * Specify the property to be used when sorting renderables for this application game world.

Callers

nothing calls this directly

Calls 3

updateFrameRateMethod · 0.95
emitFunction · 0.90
getMethod · 0.65

Tested by

no test coverage detected