2 lines
7.3 KiB
JavaScript
2 lines
7.3 KiB
JavaScript
|
import{_ as e,c as t,o as a,N as l}from"./chunks/framework.0799945b.js";const p=JSON.parse('{"title":"Module: game/player","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/game/player.md","lastUpdated":null}'),r={name:"api/modules/game/player.md"},d=l('<h1 id="module-game-player" tabindex="-1">Module: game/player <a class="header-anchor" href="#module-game-player" aria-label="Permalink to "Module: game/player""></a></h1><h2 id="interfaces" tabindex="-1">Interfaces <a class="header-anchor" href="#interfaces" aria-label="Permalink to "Interfaces""></a></h2><ul><li><a href="../../interfaces/game/player.Player">Player</a></li></ul><h2 id="type-aliases" tabindex="-1">Type Aliases <a class="header-anchor" href="#type-aliases" aria-label="Permalink to "Type Aliases""></a></h2><h3 id="layerdata" tabindex="-1">LayerData <a class="header-anchor" href="#layerdata" aria-label="Permalink to "LayerData""></a></h3><p>Ƭ <strong>LayerData</strong><<code>T</code>>: { [P in keyof T]?: T[P] extends (infer U)[] ? Record<string, LayerData<U>> : T[P] extends Record<string, never> ? never : T[P] extends Ref<infer S> ? S : T[P] extends object ? LayerData<T[P]> : T[P] }</p><p>A layer's save data. Automatically unwraps refs.</p><h4 id="type-parameters" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters" aria-label="Permalink to "Type parameters""></a></h4><table><thead><tr><th style="text-align:left;">Name</th></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td></tr></tbody></table><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/70cda5f/src/game/player.ts#L35" target="_blank" rel="noreferrer">profectus/src/game/player.ts:35</a></p><h2 id="variables" tabindex="-1">Variables <a class="header-anchor" href="#variables" aria-label="Permalink to "Variables""></a></h2><h3 id="default" tabindex="-1">default <a class="header-anchor" href="#default" aria-label="Permalink to "default""></a></h3><p>• <strong>default</strong>: <code>Object</code></p><h4 id="type-declaration" tabindex="-1">Type declaration <a class="header-anchor" href="#type-declaration" aria-label="Permalink to "Type declaration""></a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>autosave</code></td><td style="text-align:left;"><code>boolean</code></td><td style="text-align:left;">Whether or not to automatically save every couple of seconds and on tab close.</td></tr><tr><td style="text-align:left;"><code>devSpeed</code></td><td style="text-align:left;"><code>null</code> | <code>number</code></td><td style="text-align:left;">A multiplier for time passing. Set to 0 when the game is paused.</td></tr><tr><td style="text-align:left;"><code>id</code></td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;">The ID of this save.</td></tr><tr><td style="text-align:left;"><code>keepGoing</code></td><td style="text-align:left;"><code>boolean</code></td><td style="text-align:left;">Whether or not to continue playing after <a href="./../data/projEntry#haswon">hasWon</a> is true.</td></tr><tr><td style="text-align:left;"><code>layers</code></td><td style="text-align:left;"><a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type" target="_blank" rel="noreferrer"><code>Record</code></a><<code>string</code>, <a href="./player#layerdata"><code>LayerData</code></a><<code>unknown</code>>></td><td style="text-align:left;">A dictionary of layer save data.</td></tr><tr><td style="text-align:left;"><code>modID</code></td><td style="text-align:left;"><code>string</code></td><td style="text-align
|