UNPKG

duckengine

Version:
127 lines 62.9 kB
<!DOCTYPE html><html class="default no-js"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Game | DuckEngine - v2.1.0</title><meta name="description" content="Documentation for DuckEngine - v2.1.0"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">DuckEngine - v2.1.0</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">DuckEngine - v2.1.0</a></li><li><a href="../modules/core_game.html">core/game</a></li><li><a href="core_game.Game.html">Game</a></li></ul><h1>Class Game</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>classdesc</dt><dd><p>Creates a DuckEngine Game</p> </dd><dt>description</dt><dd><p>The Game Class. Stores many important methods and properties.</p> </dd><dt>since</dt><dd><p>1.0.0-beta</p> </dd></dl></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">Game</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="core_game.Game.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#animationFrame" class="tsd-kind-icon">animation<wbr/>Frame</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#browser" class="tsd-kind-icon">browser</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#cacheManager" class="tsd-kind-icon">cache<wbr/>Manager</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#canvas" class="tsd-kind-icon">canvas</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#config" class="tsd-kind-icon">config</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#deltaTime" class="tsd-kind-icon">delta<wbr/>Time</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#deltaTimeArray" class="tsd-kind-icon">delta<wbr/>Time<wbr/>Array</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#displayManager" class="tsd-kind-icon">display<wbr/>Manager</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#eventEmitter" class="tsd-kind-icon">event<wbr/>Emitter</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#fps" class="tsd-kind-icon">fps</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#isInFullscreen" class="tsd-kind-icon">is<wbr/>In<wbr/>Fullscreen</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#isLoaded" class="tsd-kind-icon">is<wbr/>Loaded</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#isRendering" class="tsd-kind-icon">is<wbr/>Rendering</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><a href="core_game.Game.html#now" class="tsd-kind-icon">now</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#oldHeight" class="tsd-kind-icon">old<wbr/>Height</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><a href="core_game.Game.html#oldTime" class="tsd-kind-icon">old<wbr/>Time</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#oldWidth" class="tsd-kind-icon">old<wbr/>Width</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#pluginManager" class="tsd-kind-icon">plugin<wbr/>Manager</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#renderer" class="tsd-kind-icon">renderer</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#scenes" class="tsd-kind-icon">scenes</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#smoothDeltaTime" class="tsd-kind-icon">smooth<wbr/>Delta<wbr/>Time</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#splashScreen" class="tsd-kind-icon">splash<wbr/>Screen</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_game.Game.html#stack" class="tsd-kind-icon">stack</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="core_game.Game.html#drawSplashScreen" class="tsd-kind-icon">draw<wbr/>Splash<wbr/>Screen</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="core_game.Game.html#hideSplashScreen" class="tsd-kind-icon">hide<wbr/>Splash<wbr/>Screen</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_game.Game.html#lockPointer" class="tsd-kind-icon">lock<wbr/>Pointer</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="core_game.Game.html#loop" class="tsd-kind-icon">loop</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_game.Game.html#setBackground" class="tsd-kind-icon">set<wbr/>Background</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_game.Game.html#setScale" class="tsd-kind-icon">set<wbr/>Scale</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_game.Game.html#showScene" class="tsd-kind-icon">show<wbr/>Scene</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="core_game.Game.html#sleep" class="tsd-kind-icon">sleep</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_game.Game.html#start" class="tsd-kind-icon">start</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_game.Game.html#stop" class="tsd-kind-icon">stop</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_game.Game.html#switchScene" class="tsd-kind-icon">switch<wbr/>Scene</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_game.Game.html#unlockPointer" class="tsd-kind-icon">unlock<wbr/>Pointer</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a><h3>constructor</h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">new <wbr/>Game<span class="tsd-signature-symbol">(</span>config<span class="tsd-signature-symbol">: </span><a href="../modules/index.Duck.html" class="tsd-signature-type" data-tsd-kind="Namespace">Duck</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.html" class="tsd-signature-type" data-tsd-kind="Namespace">Types</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.Game.html" class="tsd-signature-type" data-tsd-kind="Namespace">Game</a><span class="tsd-signature-symbol">.</span><a href="../interfaces/index.Duck.Types.Game.Config.html" class="tsd-signature-type" data-tsd-kind="Interface">Config</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="core_game.Game.html" class="tsd-signature-type" data-tsd-kind="Class">Game</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L204">core/game.ts:204</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>description</dt><dd><p>Creates a Game instance</p> </dd><dt>since</dt><dd><p>1.0.0-beta</p> </dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>config: <a href="../modules/index.Duck.html" class="tsd-signature-type" data-tsd-kind="Namespace">Duck</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.html" class="tsd-signature-type" data-tsd-kind="Namespace">Types</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.Game.html" class="tsd-signature-type" data-tsd-kind="Namespace">Game</a><span class="tsd-signature-symbol">.</span><a href="../interfaces/index.Duck.Types.Game.Config.html" class="tsd-signature-type" data-tsd-kind="Interface">Config</a></h5><div class="tsd-comment tsd-typography"><div class="lead"> <p>Game Configuration</p> </div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="core_game.Game.html" class="tsd-signature-type" data-tsd-kind="Class">Game</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="animationFrame" class="tsd-anchor"></a><h3>animation<wbr/>Frame</h3><div class="tsd-signature tsd-kind-icon">animation<wbr/>Frame<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L60">core/game.ts:60</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>A reference to the animationFrame</p> </dd><dt>since</dt><dd><p>1.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="browser" class="tsd-anchor"></a><h3>browser</h3><div class="tsd-signature tsd-kind-icon">browser<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L196">core/game.ts:196</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>The browser being used</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="cacheManager" class="tsd-anchor"></a><h3>cache<wbr/>Manager</h3><div class="tsd-signature tsd-kind-icon">cache<wbr/>Manager<span class="tsd-signature-symbol">:</span> <a href="core_storage_cacheManager.CacheManager.html" class="tsd-signature-type" data-tsd-kind="Class">CacheManager</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L68">core/game.ts:68</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>A CacheManager instance</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="canvas" class="tsd-anchor"></a><h3>canvas</h3><div class="tsd-signature tsd-kind-icon">canvas<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">HTMLCanvasElement</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L36">core/game.ts:36</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>The Canvas that is used to render to</p> </dd><dt>since</dt><dd><p>1.0.0-beta</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="config" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> config</h3><div class="tsd-signature tsd-kind-icon">config<span class="tsd-signature-symbol">:</span> <a href="../modules/index.Duck.html" class="tsd-signature-type" data-tsd-kind="Namespace">Duck</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.html" class="tsd-signature-type" data-tsd-kind="Namespace">Types</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.Game.html" class="tsd-signature-type" data-tsd-kind="Namespace">Game</a><span class="tsd-signature-symbol">.</span><a href="../interfaces/index.Duck.Types.Game.Config.html" class="tsd-signature-type" data-tsd-kind="Interface">Config</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L28">core/game.ts:28</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>Game Configuration</p> </dd><dt>since</dt><dd><p>1.0.0-beta</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="deltaTime" class="tsd-anchor"></a><h3>delta<wbr/>Time</h3><div class="tsd-signature tsd-kind-icon">delta<wbr/>Time<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L84">core/game.ts:84</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>The time since the last frame</p> </dd><dt>since</dt><dd><p>1.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="deltaTimeArray" class="tsd-anchor"></a><h3>delta<wbr/>Time<wbr/>Array</h3><div class="tsd-signature tsd-kind-icon">delta<wbr/>Time<wbr/>Array<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L76">core/game.ts:76</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>An array of the last 100 deltaTimes, deltaTime = time since last frame</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="displayManager" class="tsd-anchor"></a><h3>display<wbr/>Manager</h3><div class="tsd-signature tsd-kind-icon">display<wbr/>Manager<span class="tsd-signature-symbol">:</span> <a href="core_display_displayManager.DisplayManager.html" class="tsd-signature-type" data-tsd-kind="Class">DisplayManager</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L188">core/game.ts:188</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>A DisplayManager, manages the scaling of the canvas</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="eventEmitter" class="tsd-anchor"></a><h3>event<wbr/>Emitter</h3><div class="tsd-signature tsd-kind-icon">event<wbr/>Emitter<span class="tsd-signature-symbol">:</span> <a href="core_events_eventEmitter.EventEmitter.html" class="tsd-signature-type" data-tsd-kind="Class">EventEmitter</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L172">core/game.ts:172</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>An EventEmitter, used by many classes other than the Game class (also used by Game class)</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="fps" class="tsd-anchor"></a><h3>fps</h3><div class="tsd-signature tsd-kind-icon">fps<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L102">core/game.ts:102</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>The current fps (Frames per second) that the Game loop is running at</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="isInFullscreen" class="tsd-anchor"></a><h3>is<wbr/>In<wbr/>Fullscreen</h3><div class="tsd-signature tsd-kind-icon">is<wbr/>In<wbr/>Fullscreen<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L111">core/game.ts:111</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>The state of being in fullscreen, determines if the game is in fullscreen or not, changing this value does nothing use game.fullscreen and game.unfullscreen to effect this value</p> </dd><dt>since</dt><dd><p>1.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="isLoaded" class="tsd-anchor"></a><h3>is<wbr/>Loaded</h3><div class="tsd-signature tsd-kind-icon">is<wbr/>Loaded<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L156">core/game.ts:156</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>The state of the game, if it is currently loading</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="isRendering" class="tsd-anchor"></a><h3>is<wbr/>Rendering</h3><div class="tsd-signature tsd-kind-icon">is<wbr/>Rendering<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L148">core/game.ts:148</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>The state of the game, if it is currently rendering</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-protected"><a id="now" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> now</h3><div class="tsd-signature tsd-kind-icon">now<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L94">core/game.ts:94</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="oldHeight" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> old<wbr/>Height</h3><div class="tsd-signature tsd-kind-icon">old<wbr/>Height<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L127">core/game.ts:127</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>The width of the canvas that was set by the config, never changes, may not be current</p> </dd><dt>since</dt><dd><p>2.1.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-protected"><a id="oldTime" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> old<wbr/>Time</h3><div class="tsd-signature tsd-kind-icon">old<wbr/>Time<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L93">core/game.ts:93</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="oldWidth" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> old<wbr/>Width</h3><div class="tsd-signature tsd-kind-icon">old<wbr/>Width<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L119">core/game.ts:119</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>The width of the canvas that was set by the config, never changes, may not be current</p> </dd><dt>since</dt><dd><p>2.1.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="pluginManager" class="tsd-anchor"></a><h3>plugin<wbr/>Manager</h3><div class="tsd-signature tsd-kind-icon">plugin<wbr/>Manager<span class="tsd-signature-symbol">:</span> <a href="core_misc_pluginManager.PluginManager.html" class="tsd-signature-type" data-tsd-kind="Class">PluginManager</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L180">core/game.ts:180</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>A PluginManager, stores and manages plugins</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="renderer" class="tsd-anchor"></a><h3>renderer</h3><div class="tsd-signature tsd-kind-icon">renderer<span class="tsd-signature-symbol">:</span> <a href="core_renderer_canvas_canvasRenderer.CanvasRenderer.html" class="tsd-signature-type" data-tsd-kind="Class">CanvasRenderer</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L44">core/game.ts:44</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>The Renderer used to draw and clear frames</p> </dd><dt>since</dt><dd><p>2.1.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="scenes" class="tsd-anchor"></a><h3>scenes</h3><div class="tsd-signature tsd-kind-icon">scenes<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>add<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span>remove<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> }</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L137">core/game.ts:137</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>The scene manager, object that holds methods to add and remove scenes from the Game.stack</p> </dd><dt>type{</dt><dd><p>add: (scenes: Scene[]) =&gt; void; remove: (scene: Scene) =&gt; void };</p> </dd><dt>since</dt><dd><p>1.0.0-beta</p> </dd></dl></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5>add<span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon">add<span class="tsd-signature-symbol">(</span>scenes<span class="tsd-signature-symbol">: </span><a href="core_scene.Scene.html" class="tsd-signature-type" data-tsd-kind="Class">Scene</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L138">core/game.ts:138</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>scenes: <a href="core_scene.Scene.html" class="tsd-signature-type" data-tsd-kind="Class">Scene</a><span class="tsd-signature-symbol">[]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li><li class="tsd-parameter"><h5>remove<span class="tsd-signature-symbol">:</span>function</h5><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon">remove<span class="tsd-signature-symbol">(</span>scene<span class="tsd-signature-symbol">: </span><a href="core_scene.Scene.html" class="tsd-signature-type" data-tsd-kind="Class">Scene</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L139">core/game.ts:139</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>scene: <a href="core_scene.Scene.html" class="tsd-signature-type" data-tsd-kind="Class">Scene</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="smoothDeltaTime" class="tsd-anchor"></a><h3>smooth<wbr/>Delta<wbr/>Time</h3><div class="tsd-signature tsd-kind-icon">smooth<wbr/>Delta<wbr/>Time<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L92">core/game.ts:92</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>The time since the last frame averaged and smoothed out using Game.deltaTimeArray, applied to velocity of gameobjects</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="splashScreen" class="tsd-anchor"></a><h3>splash<wbr/>Screen</h3><div class="tsd-signature tsd-kind-icon">splash<wbr/>Screen<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L164">core/game.ts:164</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>The source to the splash screen image that is shown during loading</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="stack" class="tsd-anchor"></a><h3>stack</h3><div class="tsd-signature tsd-kind-icon">stack<span class="tsd-signature-symbol">:</span> <a href="../interfaces/index.Duck.Types.Game.Stack.html" class="tsd-signature-type" data-tsd-kind="Interface">Stack</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L52">core/game.ts:52</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>The Game Stack, holds all Scenes, and the defaultScene key</p> </dd><dt>since</dt><dd><p>1.0.0-beta</p> </dd></dl></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="drawSplashScreen" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> draw<wbr/>Splash<wbr/>Screen</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"><li class="tsd-signature tsd-kind-icon">draw<wbr/>Splash<wbr/>Screen<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L494">core/game.ts:494</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>Draws the splash screen to the canvas by setting the background image</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="hideSplashScreen" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> hide<wbr/>Splash<wbr/>Screen</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"><li class="tsd-signature tsd-kind-icon">hide<wbr/>Splash<wbr/>Screen<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L507">core/game.ts:507</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>Hides the splash screen to the canvas</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="lockPointer" class="tsd-anchor"></a><h3>lock<wbr/>Pointer</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">lock<wbr/>Pointer<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L620">core/game.ts:620</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>Locks the pointer on the canvas</p> </dd><dt>emits</dt><dd><p>EVENTS.GAME.LOCK_POINTER</p> </dd><dt>since</dt><dd><p>1.0.0</p> </dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="loop" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> loop</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"><li class="tsd-signature tsd-kind-icon">loop<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L461">core/game.ts:461</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>Core loop</p> </dd><dt>since</dt><dd><p>1.0.0-beta</p> </dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="setBackground" class="tsd-anchor"></a><h3>set<wbr/>Background</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">set<wbr/>Background<span class="tsd-signature-symbol">(</span>background<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L545">core/game.ts:545</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>Sets the style background color of the canvas</p> </dd><dt>emits</dt><dd><p>EVENTS.GAME.SET_BACKGROUND</p> </dd><dt>since</dt><dd><p>1.0.0-beta</p> </dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>background: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead"> <p>Background color</p> </div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="setScale" class="tsd-anchor"></a><h3>set<wbr/>Scale</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">set<wbr/>Scale<span class="tsd-signature-symbol">(</span>scale<span class="tsd-signature-symbol">: </span><a href="../interfaces/index.Duck.Types.Misc.Scale.html" class="tsd-signature-type" data-tsd-kind="Interface">Scale</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L522">core/game.ts:522</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>Sets the scale of the canvas</p> </dd><dt>emits</dt><dd><p>EVENTS.GAME.SET_SCALE</p> </dd><dt>since</dt><dd><p>1.0.0-beta</p> </dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>scale: <a href="../interfaces/index.Duck.Types.Misc.Scale.html" class="tsd-signature-type" data-tsd-kind="Interface">Scale</a></h5><div class="tsd-comment tsd-typography"><div class="lead"> <p>Scale to set the canvas to</p> </div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="showScene" class="tsd-anchor"></a><h3>show<wbr/>Scene</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">show<wbr/>Scene<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L599">core/game.ts:599</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>Sets a scene to visible. Keeps the current scene visible</p> </dd><dt>emits</dt><dd><p>EVENTS.GAME.SHOW_SCENE</p> </dd><dt>since</dt><dd><p>1.0.0-beta</p> </dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead"> <p>Key of the scene to show</p> </div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a id="sleep" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> sleep</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"><li class="tsd-signature tsd-kind-icon">sleep<span class="tsd-signature-symbol">(</span>ms<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L511">core/game.ts:511</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>ms: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="start" class="tsd-anchor"></a><h3>start</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">start<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L377">core/game.ts:377</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>Starts the game loop</p> </dd><dt>emits</dt><dd><p>EVENTS.GAME.LOAD_BEGIN</p> </dd><dt>emits</dt><dd><p>EVENTS.GAME.DRAW_SPLASH</p> </dd><dt>emits</dt><dd><p>EVENTS.GAME.LOAD_SCENE</p> </dd><dt>emits</dt><dd><p>EVENTS.GAME.LOAD_FINISH</p> </dd><dt>since</dt><dd><p>1.0.0-beta</p> </dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="stop" class="tsd-anchor"></a><h3>stop</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">stop<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L430">core/game.ts:430</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>Stops the game loop</p> </dd><dt>emits</dt><dd><p>EVENTS.GAME.STOP</p> </dd><dt>since</dt><dd><p>1.0.0</p> </dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="switchScene" class="tsd-anchor"></a><h3>switch<wbr/>Scene</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">switch<wbr/>Scene<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, key2<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L565">core/game.ts:565</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>Switches the current scene by the key</p> </dd><dt>emits</dt><dd><p>EVENTS.GAME.SWITCH_SCENE</p> </dd><dt>since</dt><dd><p>1.0.0-beta</p> </dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead"> <p>Key of the scene to switch from</p> </div></div></li><li><h5>key2: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead"> <p>Key of the scene to switch to</p> </div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="unlockPointer" class="tsd-anchor"></a><h3>unlock<wbr/>Pointer</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">unlock<wbr/>Pointer<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/game.ts#L633">core/game.ts:633</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Game</p> </dd><dt>description</dt><dd><p>Unlocks the pointer from the canvas</p> </dd><dt>emits</dt><dd><p>EVENTS.GAME.UNLOCK_POINTER</p> </dd><dt>since</dt><dd><p>1.0.0</p> </dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Modules</a></li><li class=" tsd-kind-module"><a href="../modules/core_animation_animation.html">core/animation/animation</a></li><li class=" tsd-kind-module"><a href="../modules/core_animation_animationFrame.html">core/animation/animation<wbr/>Frame</a></li><li class=" tsd-kind-module"><a href="../modules/core_animation_animationManager.html">core/animation/animation<wbr/>Manager</a></li><li class=" tsd-kind-module"><a href="../modules/core_animation_animationState.html">core/animation/animation<wbr/>State</a></li><li class=" tsd-kind-module"><a href="../modules/core_animation_stateMachine.html">core/animation/state<wbr/>Machine</a></li><li class=" tsd-kind-module"><a href="../modules/core_camera_camera.html">core/camera/camera</a></li><li class=" tsd-kind-module"><a href="../modules/core_cutscene_cutscene.html">core/cutscene/cutscene</a></li><li class=" tsd-kind-module"><a href="../modules/core_debug_debug.html">core/debug/debug</a></li><li class=" tsd-kind-module"><a href="../modules/core_display_displayManager.html">core/display/display<wbr/>Manager</a></li><li class=" tsd-kind-module"><a href="../modules/core_effect_effect.html">core/effect/effect</a></li><li class=" tsd-kind-module"><a href="../modules/core_effect_preset_explosion.html">core/effect/preset/explosion</a></li><li class=" tsd-kind-module"><a href="../modules/core_effect_preset_smoke.html">core/effect/preset/smoke</a></li><li class=" tsd-kind-module"><a href="../modules/core_events_eventEmitter.html">core/events/event<wbr/>Emitter</a></li><li class=" tsd-kind-module"><a href="../modules/core_events_events.html">core/events/events</a></li><li class=" tsd-kind-module"><a href="../modules/core_events_main_displayEvents.html">core/events/main/display<wbr/>Events</a></li><li class=" tsd-kind-module"><a href="../modules/core_events_main_gameEvents.html">core/events/main/game<wbr/>Events</a></li><li class=" tsd-kind-module"><a href="../modules/core_events_main_rendererEvents.html">core/events/main/renderer<wbr/>Events</a></li><li class=" tsd-kind-module"><a href="../modules/core_events_other_buttonEvents.html">core/events/other/button<wbr/>Events</a></li><li class=" tsd-kind-module"><a href="../modules/core_events_other_cutsceneEvents.html">core/events/other/cutscene<wbr/>Events</a></li><li class=" tsd-kind-module"><a href="../modules/core_events_other_groupEvents.html">core/events/other/group<wbr/>Events</a></li><li class="current tsd-kind-module"><a href="../modules/core_game.html">core/game</a></li><li class=" tsd-kind-module"><a href="../modules/core_gameobjects_circle.html">core/gameobjects/circle</a></li><li class=" tsd-kind-module"><a href="../modules/core_gameobjects_gameObject.html">core