profectus-docs/assets/api_game_layers_functions_addLayer.md.Dkr5twEX.js

1 line
3 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{_ as a,c as r,a0 as t,o}from"./chunks/framework.P9qPzDnn.js";const p=JSON.parse('{"title":"Function: addLayer()","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/game/layers/functions/addLayer.md","filePath":"api/game/layers/functions/addLayer.md","lastUpdated":null}'),n={name:"api/game/layers/functions/addLayer.md"};function d(l,e,s,i,c,y){return o(),r("div",null,e[0]||(e[0]=[t('<p><a href="./../../../">Profectus</a> / <a href="./../">game/layers</a> / addLayer</p><h1 id="function-addlayer" tabindex="-1">Function: addLayer() <a class="header-anchor" href="#function-addlayer" aria-label="Permalink to &quot;Function: addLayer()&quot;"></a></h1><blockquote><p><strong>addLayer</strong>(<code>layer</code>, <code>player</code>): <code>void</code></p></blockquote><p>Enables a layer object, so it will be updated every tick. Note that accessing a layer/its properties does NOT require it to be enabled. For dynamic layers you can call this function and <a href="./removeLayer">removeLayer</a> as necessary. Just make sure <a href="./../../../data/projEntry/functions/getInitialLayers">data/projEntry.getInitialLayers</a> will provide an accurate list of layers based on the player data object. For static layers just make <a href="./../../../data/projEntry/functions/getInitialLayers">data/projEntry.getInitialLayers</a> return all the layers.</p><h2 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to &quot;Parameters&quot;"></a></h2><h3 id="layer" tabindex="-1">layer <a class="header-anchor" href="#layer" aria-label="Permalink to &quot;layer&quot;"></a></h3><p><a href="./../interfaces/Layer"><code>Layer</code></a></p><p>The layer to add.</p><h3 id="player" tabindex="-1">player <a class="header-anchor" href="#player" aria-label="Permalink to &quot;player&quot;"></a></h3><p>The player data object, which will have a data object for this layer.</p><h4 id="layers" tabindex="-1">layers <a class="header-anchor" href="#layers" aria-label="Permalink to &quot;layers&quot;"></a></h4><p><a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type" target="_blank" rel="noreferrer"><code>Record</code></a>&lt;<code>string</code>, <a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type" target="_blank" rel="noreferrer"><code>Record</code></a>&lt;<code>string</code>, <code>unknown</code>&gt;&gt;</p><h2 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to &quot;Returns&quot;"></a></h2><p><code>void</code></p><h2 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to &quot;Defined in&quot;"></a></h2><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/layers.tsx#L311" target="_blank" rel="noreferrer">profectus/src/game/layers.tsx:311</a></p>',16)]))}const u=a(n,[["render",d]]);export{p as __pageData,u as default};