-
Notifications
You must be signed in to change notification settings - Fork 0
/
SoundPlayerObject.html
30 lines (30 loc) · 33 KB
/
SoundPlayerObject.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html>
<html lang="en"><!-- use theme color or fallback -->
<!--use textcolor from settings, otherwise create a contrasting color to theme color-->
<head><meta charset="utf-8"/><link href="./bootstrap/css/bootstrap.min.css" rel="stylesheet"/><link href="./bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet"/><link href="./bootstrap/css/bootstrap-select.min.css" rel="stylesheet"/><link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700,700italic,400italic" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,600,600italic,400" rel="stylesheet" type="text/css"/><link href="https://netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.css" rel="stylesheet" type="text/css"/><script src="./jquery-1.9.1.min.js"></script><script src="./bootstrap/js/bootstrap.min.js"></script><script src="./bootstrap/js/bootstrap-select.min.js"></script><link href="./styles.css" rel="stylesheet"/><link href="./extra-styles.css" rel="stylesheet"/><link href="./haxe-nav.css" rel="stylesheet"/><link href="./dark-mode.css" rel="stylesheet"/><script>var dox = {rootPath: "./",platforms: ["types"]};</script><script src="./nav.js"></script><script src="./index.js"></script><link rel="icon" href="./favicon.ico" type="image/x-icon"/><title>SoundPlayerObject</title></head><body><script>/* Here to prevent flash of unstyled content */let systemDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;if ((!localStorage.theme && systemDarkMode) || localStorage.theme == "dark") {document.body.style.backgroundColor = "#111";document.body.style.opacity = "0";document.addEventListener("DOMContentLoaded", function(event) {toggleTheme();document.body.style.backgroundColor = "";document.body.style.opacity = "";});}</script><style>
.navbar .brand {
display: inline-block;
float: none;
text-shadow: 0 0 0 transparent;
}
</style><nav class="nav"><div class="navbar"><div class="navbar-inner" style="background:#FAFAFA; border-bottom:1px solid rgba(0,0,0,.09)"><div class="container"><a class="brand" style="color:#000000" href="./">API Documentation</a><a href="#" id="theme-toggle" class="brand" style="color:#000000" onclick="toggleTheme()" title="Toggle Dark Mode"><i class="fa fa-moon-o"></i></a></div></div></div></nav><div class="container main-content"><div class="row-fluid"><div class="span3"><div class="well sidebar-nav"><form class="form-search" id="searchForm"><div class="input-prepend input-block-level"><span class="add-on"><i class="fa fa-search"></i></span><input id="search" type="text" placeholder="Filter (Ctrl+P)" autocomplete="off"/></div></form></div><div class="well sidebar-nav" id="explorer"><div id="nav"></div></div></div><div class="span9"><div class="page-header"><h1><small>class</small> SoundPlayerObject</h1><h4><small><a href="./">no package</a></small></h4><h4><small>extends <a class="type" title="GameObject - The base GameObject used for almost everything in the game." href="./GameObject.html">GameObject</a></small></h4> <span class="label label-meta label-meta-directlyUsed" title="Marks types that are directly referenced by non-extern code.">@:directlyUsed</span></div><div class="body"><div class="doc doc-main"><p></p></div><h3 class="section">Constructor</h3><div class="fields"><div class="field "><a name="new"></a><h3 class="anchor"><code><a href="#new"><span class="identifier">new</span></a>(<span style="white-space:nowrap">?X:<span class="type">Float</span>,</span> <span style="white-space:nowrap">?Y:<span class="type">Float</span>,</span> <span style="white-space:nowrap">?premadeEchoBody:<span class="type">Body</span></span>)</code></h3><div class="doc"><p></p></div></div></div><h3 class="section">Variables</h3><div class="fields"><div class="field "><a name="sound"></a><h3 class="anchor"><code><a href="#sound"><span class="identifier">sound</span></a>:<span class="type">FlxSound</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="soundOptions"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value({ })</span><a href="#soundOptions"><span class="identifier">soundOptions</span></a>:<a class="type" title="states.Play2DSoundOptions" href="./states/Play2DSoundOptions.html">Play2DSoundOptions</a><span> = { }</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="soundWasPlayingBeforeDeath"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(false)</span><a href="#soundWasPlayingBeforeDeath"><span class="identifier">soundWasPlayingBeforeDeath</span></a>:<span class="type">Bool</span><span> = false</span></code></h3><div class="doc"><p></p></div></div></div><h3 class="section">Methods</h3><div class="fields"><div class="field "><a name="playSound"></a><h3 class="anchor"><code><a href="#playSound"><span class="identifier">playSound</span></a>():<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div></div> <div class="inherited-fields well"><h3 class="section">Inherited Variables</h3><div class="fields"><h4><a href="#" class="expand-button"><i class="fa fa-arrow-circle-o-right"></i></a> Defined by <a class="type" title="GameObject - The base GameObject used for almost everything in the game." href="./GameObject.html">GameObject</a></h4><div style="display:none"><div class="field "><a name="age"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(0)</span><a href="#age"><span class="identifier">age</span></a>:<span class="type">Float</span><span> = 0</span></code></h3><div class="doc"><p>Amount of seconds during which the object has been alive.</p></div></div><div class="field "><a name="children"></a><h3 class="anchor"><code><a href="#children"><span class="identifier">children</span></a>:<a class="type" title="GameObjectChildrenGroup - A custom FlxTypedSpriteGroup that is designed to only hold GameObjects and helps with automatically networking child objects." href="./GameObjectChildrenGroup.html">GameObjectChildrenGroup</a></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="collideWithAny"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(false)</span><a href="#collideWithAny"><span class="identifier">collideWithAny</span></a>:<span class="type">Bool</span><span> = false</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="collideWithCharacters"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(false)</span><a href="#collideWithCharacters"><span class="identifier">collideWithCharacters</span></a>:<span class="type">Bool</span><span> = false</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="collideWithSolidTiles"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(false)</span><a href="#collideWithSolidTiles"><span class="identifier">collideWithSolidTiles</span></a>:<span class="type">Bool</span><span> = false</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="currentImageData"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(SpriteImage.empty)</span><a href="#currentImageData"><span class="identifier">currentImageData</span></a>:<a class="type" title="SpriteImage" href="./SpriteImage.html">SpriteImage</a><span> = SpriteImage.empty</span></code></h3><div class="doc"><p>The current shown sprite.</p></div></div><div class="field "><a name="currentImageFrameTime"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(0)</span><a href="#currentImageFrameTime"><span class="identifier">currentImageFrameTime</span></a>:<span class="type">Float</span><span> = 0</span></code></h3><div class="doc"><p>Corresponds to the currently shown sprite frame.</p></div></div><div class="field "><a name="customVars"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value([])</span><a href="#customVars"><span class="identifier">customVars</span></a>:<span class="type">Map</span><<span class="type">String</span>, <span class="type">Dynamic</span>><span> = []</span></code></h3><div class="doc"><p>A Map for storing custom variables.</p>
<p>Changing this Map does not send the values over network by default. For that, use the <code>syncVar</code> functions with <code>"cv:<custom var name>"</code> as the <code>variableName</code> argument.</p>
<p>Example:</p>
<pre><code>var effectDuration = 0.5;
self.customVars.set("effectDuration", effectDuration);
self.syncVarFloat("cv:effectDuration", effectDuration);</code></pre></div></div><div class="field "><a name="depth"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(0)</span><a href="#depth"><span class="identifier">depth</span></a>:<span class="type">Float</span><span> = 0</span></code></h3><div class="doc"><p>The Z-depth of the object.</p>
<p>Changing this causes the game to sort ALL objects, so be aware of that when doing operations that change this frequently.</p></div></div><div class="field "><a name="destroyOnGameOver"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(false)</span><a href="#destroyOnGameOver"><span class="identifier">destroyOnGameOver</span></a>:<span class="type">Bool</span><span> = false</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="destroyOnWaveEnd"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(false)</span><a href="#destroyOnWaveEnd"><span class="identifier">destroyOnWaveEnd</span></a>:<span class="type">Bool</span><span> = false</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="echoBody"></a><h3 class="anchor"><code><a href="#echoBody"><span class="identifier">echoBody</span></a>:<span class="type">Body</span></code></h3><div class="doc"><p>The <a href="https://austineast.dev/echo/api/echo/Body.html">Echo Body</a> of this object.</p></div></div><div class="field "><a name="hasAuthority"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#hasAuthority"><span class="identifier">hasAuthority</span></a>:<span class="type">Bool</span></code></h3><div class="doc"><p><code>true</code> if the local machine is the authority owner of this object.</p>
<p>Always <code>true</code> in a local game.</p></div></div><div class="field "><a name="hitboxHeight"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(0)</span><span class="label">read only</span><a href="#hitboxHeight"><span class="identifier">hitboxHeight</span></a>:<span class="type">Float</span><span> = 0</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="hitboxMaxDimension"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(0)</span><span class="label">read only</span><a href="#hitboxMaxDimension"><span class="identifier">hitboxMaxDimension</span></a>:<span class="type">Float</span><span> = 0</span></code></h3><div class="doc"><p>Either <code>hitboxWidth</code> or <code>hitboxHeight</code>, whichever is bigger.</p></div></div><div class="field "><a name="hitboxWidth"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(0)</span><span class="label">read only</span><a href="#hitboxWidth"><span class="identifier">hitboxWidth</span></a>:<span class="type">Float</span><span> = 0</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="isSolidTile"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(false)</span><a href="#isSolidTile"><span class="identifier">isSolidTile</span></a>:<span class="type">Bool</span><span> = false</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="lockVisualSprite"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(false)</span><a href="#lockVisualSprite"><span class="identifier">lockVisualSprite</span></a>:<span class="type">Bool</span><span> = false</span></code></h3><div class="doc"><p>If true, various functions like <code>changeImage</code> will not affect the visual sprite and instead will do nothing.</p></div></div><div class="field "><a name="name"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value("")</span><a href="#name"><span class="identifier">name</span></a>:<span class="type">String</span><span> = ""</span></code></h3><div class="doc"><p>Arbitrary object name. May be useful for identifying certain objects?</p></div></div><div class="field "><a name="networkAuthorityOwnerID"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(-1)</span><span class="label">read only</span><a href="#networkAuthorityOwnerID"><span class="identifier">networkAuthorityOwnerID</span></a>:<span class="type">Int</span><span> = -1</span></code></h3><div class="doc"><p>The ID of the network authority owner client.</p>
<p><code>-1</code> if the server is the authority owner.</p>
<p>Always <code>-1</code> in a local game.</p></div></div><div class="field "><a name="networkID"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(-1)</span><span class="label">read only</span><a href="#networkID"><span class="identifier">networkID</span></a>:<span class="type">Int</span><span> = -1</span></code></h3><div class="doc"><p>The network ID of this object.</p>
<p>Always <code>-1</code> in a local game.</p></div></div><div class="field "><a name="networked"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(false)</span><span class="label">read only</span><a href="#networked"><span class="identifier">networked</span></a>:<span class="type">Bool</span><span> = false</span></code></h3><div class="doc"><p><code>true</code> only if the game is online and the object has an authority owner assigned.</p></div></div><div class="field "><a name="networkedAndHasAuthority"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#networkedAndHasAuthority"><span class="identifier">networkedAndHasAuthority</span></a>:<span class="type">Bool</span></code></h3><div class="doc"><p>Same as <code>hasAuthority</code>, but returns <code>false</code> if <code>networked == false</code>.</p></div></div><div class="field "><a name="parent"></a><h3 class="anchor"><code><a href="#parent"><span class="identifier">parent</span></a>:<a class="type" title="GameObject - The base GameObject used for almost everything in the game." href="./GameObject.html">GameObject</a></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="passThroughSolidTiles"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(true)</span><a href="#passThroughSolidTiles"><span class="identifier">passThroughSolidTiles</span></a>:<span class="type">Bool</span><span> = true</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="preventNetworking"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(false)</span><span class="label">read only</span><a href="#preventNetworking"><span class="identifier">preventNetworking</span></a>:<span class="type">Bool</span><span> = false</span></code></h3><div class="doc"><p>Set this to <code>true</code> before any networking-related functions to prevent this object from being networked entirely.</p></div></div><div class="field "><a name="scripts"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value([])</span><a href="#scripts"><span class="identifier">scripts</span></a>:<span class="type">Map</span><<span class="type">String</span>, <span class="type">Script</span>><span> = []</span></code></h3><div class="doc"><p>Collection of scripts that can be invoked using <code>runScript</code>.</p>
<p>You can add your own scripts to this Map, or replace pre-set ones. Example:</p>
<pre><code>self.scripts.set("onPickup", loadScript("objects/StationaryPickupAmmo/onPickup.hscript"));
self.scripts.set("onUpdate", loadScript("objects/Corpse/onUpdate.hscript"));</code></pre></div></div><div class="field "><a name="spawnedOverNetwork"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(false)</span><span class="label">read only</span><a href="#spawnedOverNetwork"><span class="identifier">spawnedOverNetwork</span></a>:<span class="type">Bool</span><span> = false</span></code></h3><div class="doc"><p><code>true</code> if the game is online and <code>spawnOverNetwork</code> was called.</p></div></div><div class="field "><a name="timeScaleManager"></a><h3 class="anchor"><code><a href="#timeScaleManager"><span class="identifier">timeScaleManager</span></a>:<a class="type" title="TimeScaleManager" href="./TimeScaleManager.html">TimeScaleManager</a></code></h3><div class="doc"><p>This object's individual time scale manager. Useful for things like slowing zones, map-wide time stopping abilities, etc.</p></div></div><div class="field "><a name="timerDisplayOffset"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(new FlxPoint(0, -4))</span><a href="#timerDisplayOffset"><span class="identifier">timerDisplayOffset</span></a>:<span class="type">FlxPoint</span><span> = new FlxPoint(0, -4)</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="timerDisplayOffsetWithHitbox"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(new FlxPoint(0, -0.5))</span><a href="#timerDisplayOffsetWithHitbox"><span class="identifier">timerDisplayOffsetWithHitbox</span></a>:<span class="type">FlxPoint</span><span> = new FlxPoint(0, -0.5)</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="timerDisplayStartingRadius"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(6)</span><a href="#timerDisplayStartingRadius"><span class="identifier">timerDisplayStartingRadius</span></a>:<span class="type">Float</span><span> = 6</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="timerDisplayThickness"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(2)</span><a href="#timerDisplayThickness"><span class="identifier">timerDisplayThickness</span></a>:<span class="type">Float</span><span> = 2</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="useHitbox"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value(true)</span><a href="#useHitbox"><span class="identifier">useHitbox</span></a>:<span class="type">Bool</span><span> = true</span></code></h3><div class="doc"><p>If <code>false</code>, <code>changeHitbox</code> will not do anything.</p>
<p>Currently, only objects with custom hitbox shapes utilize this (e.g. Circle, Slash).</p></div></div><div class="field "><a name="visualSprite"></a><h3 class="anchor"><code><a href="#visualSprite"><span class="identifier">visualSprite</span></a>:<span class="type">FlxSprite</span></code></h3><div class="doc"><p>The FlxSprite responsible for showing the object's sprite image.</p></div></div></div></div><h3 class="section">Inherited Methods</h3><div class="fields"><h4><a href="#" class="expand-button"><i class="fa fa-arrow-circle-o-right"></i></a> Defined by <a class="type" title="GameObject - The base GameObject used for almost everything in the game." href="./GameObject.html">GameObject</a></h4><div style="display:none"><div class="field "><a name="addChildGameObject"></a><h3 class="anchor"><code><a href="#addChildGameObject"><span class="identifier">addChildGameObject</span></a>(<span style="white-space:nowrap">child:<a class="type" title="GameObject - The base GameObject used for almost everything in the game." href="./GameObject.html">GameObject</a></span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="changeHitbox"></a><h3 class="anchor"><code><a href="#changeHitbox"><span class="identifier">changeHitbox</span></a>(<span style="white-space:nowrap">width:<span class="type">Float</span>,</span> <span style="white-space:nowrap">height:<span class="type">Float</span></span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="changeImage"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value({ loop : true })</span><a href="#changeImage"><span class="identifier">changeImage</span></a>(<span style="white-space:nowrap">newImagePath:<span class="type">String</span>,</span> <span style="white-space:nowrap">?forcedFrame:<span class="type">Int</span>,</span> <span style="white-space:nowrap">loop:<span class="type">Bool</span> = true</span>):<span class="type">Bool</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="displayTimer"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value({ network : false })</span><a href="#displayTimer"><span class="identifier">displayTimer</span></a>(<span style="white-space:nowrap">key:<span class="type">String</span>,</span> <span style="white-space:nowrap">color:<span class="type">Int</span>,</span> <span style="white-space:nowrap">network:<span class="type">Bool</span> = false</span>):<span class="type">Void</span></code></h3><div class="doc"><p>Make this timer's remaining time visually show up above the object as a circle.</p></div></div><div class="field "><a name="getTimer"></a><h3 class="anchor"><code><a href="#getTimer"><span class="identifier">getTimer</span></a>(<span style="white-space:nowrap">key:<span class="type">String</span></span>):<span class="type">Float</span></code></h3><div class="doc"><p>Retrieves a timer value.</p>
<p>Timers decrease every second until they hit 0.</p></div></div><div class="field "><a name="killOverNetwork"></a><h3 class="anchor"><code><a href="#killOverNetwork"><span class="identifier">killOverNetwork</span></a>():<span class="type">Void</span></code></h3><div class="doc"><p>Kill this object and its children on remote machines.</p>
<p>Call this before calling <code>kill</code>.</p></div></div><div class="field "><a name="removeChildGameObject"></a><h3 class="anchor"><code><a href="#removeChildGameObject"><span class="identifier">removeChildGameObject</span></a>(<span style="white-space:nowrap">child:<a class="type" title="GameObject - The base GameObject used for almost everything in the game." href="./GameObject.html">GameObject</a></span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="reviveOverNetwork"></a><h3 class="anchor"><code><a href="#reviveOverNetwork"><span class="identifier">reviveOverNetwork</span></a>():<span class="type">Void</span></code></h3><div class="doc"><p>Revive an object and its children on remote machines.</p>
<p>Call this before calling <code>revive</code>.</p></div></div><div class="field "><a name="runScript"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value({ defaultValue : null })</span><a href="#runScript"><span class="identifier">runScript</span></a>(<span style="white-space:nowrap">scriptID:<span class="type">String</span>,</span> <span style="white-space:nowrap">?extraVariables:<span class="type">Map</span><<span class="type">String</span>, <span class="type">Dynamic</span>>,</span> <span style="white-space:nowrap">?defaultValue:<span class="type">Dynamic</span></span>):<span class="type">Dynamic</span></code></h3><div class="doc"><p>Runs an <a href="https://github.com/HaxeFoundation/hscript">hscript</a> script.</p><p class="javadoc">Parameters:</p><table class="table table-bordered params"><tr><th style="width:25%;"><code>scriptID</code></th><td><p>The ID of the script to look for in the <code>scripts</code> Map.</p></td></tr><tr><th style="width:25%;"><code>extraVariables</code></th><td><p>Any extra variables you want to pass to the script.</p></td></tr><tr><th style="width:25%;"><code>defaultValue</code></th><td><p>A default value to return if the script doesn't exist.</p></td></tr></table><p class="javadoc">Returns:</p><div class="indent inline-content"><p>The value that the script returns, or <code>defaultValue</code> if the script doesn't exist.</p></div></div></div><div class="field "><a name="setNetworkAuthority"></a><h3 class="anchor"><code><a href="#setNetworkAuthority"><span class="identifier">setNetworkAuthority</span></a>(<span style="white-space:nowrap">networkAuthorityOwnerID:<span class="type">Int</span></span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="setNetworkAuthorityAuto"></a><h3 class="anchor"><code><a href="#setNetworkAuthorityAuto"><span class="identifier">setNetworkAuthorityAuto</span></a>():<span class="type">Void</span></code></h3><div class="doc"><p>Sets the network authority to the local server (if one is running) or the local client.</p></div></div><div class="field "><a name="setNetworkAuthorityToLocalClient"></a><h3 class="anchor"><code><a href="#setNetworkAuthorityToLocalClient"><span class="identifier">setNetworkAuthorityToLocalClient</span></a>():<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="setNetworkAuthorityToServer"></a><h3 class="anchor"><code><a href="#setNetworkAuthorityToServer"><span class="identifier">setNetworkAuthorityToServer</span></a>():<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="setTimer"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value({ network : false })</span><a href="#setTimer"><span class="identifier">setTimer</span></a>(<span style="white-space:nowrap">key:<span class="type">String</span>,</span> <span style="white-space:nowrap">value:<span class="type">Float</span>,</span> <span style="white-space:nowrap">network:<span class="type">Bool</span> = false</span>):<span class="type">Void</span></code></h3><div class="doc"><p>Sets a timer value, and sends it over the network if necessary.</p>
<p>Timers decrease every second until they hit 0.</p></div></div><div class="field "><a name="sortChildren"></a><h3 class="anchor"><code><a href="#sortChildren"><span class="identifier">sortChildren</span></a>():<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="spawnOverNetwork"></a><h3 class="anchor"><code><a href="#spawnOverNetwork"><span class="identifier">spawnOverNetwork</span></a>():<span class="type">Void</span></code></h3><div class="doc"><p>Spawn this object on remote machines.</p>
<p>Call this after adding this object to a state or a parent object.</p></div></div><div class="field "><a name="syncAngle"></a><h3 class="anchor"><code><a href="#syncAngle"><span class="identifier">syncAngle</span></a>():<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="syncMaxVelocityLength"></a><h3 class="anchor"><code><a href="#syncMaxVelocityLength"><span class="identifier">syncMaxVelocityLength</span></a>():<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="syncPosition"></a><h3 class="anchor"><code><a href="#syncPosition"><span class="identifier">syncPosition</span></a>():<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="syncVarBool"></a><h3 class="anchor"><code><a href="#syncVarBool"><span class="identifier">syncVarBool</span></a>(<span style="white-space:nowrap">variableName:<span class="type">String</span>,</span> <span style="white-space:nowrap">currentValue:<span class="type">Bool</span></span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="syncVarFloat"></a><h3 class="anchor"><code><a href="#syncVarFloat"><span class="identifier">syncVarFloat</span></a>(<span style="white-space:nowrap">variableName:<span class="type">String</span>,</span> <span style="white-space:nowrap">currentValue:<span class="type">Float</span></span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="syncVarInt"></a><h3 class="anchor"><code><a href="#syncVarInt"><span class="identifier">syncVarInt</span></a>(<span style="white-space:nowrap">variableName:<span class="type">String</span>,</span> <span style="white-space:nowrap">currentValue:<span class="type">Int</span></span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="syncVarString"></a><h3 class="anchor"><code><a href="#syncVarString"><span class="identifier">syncVarString</span></a>(<span style="white-space:nowrap">variableName:<span class="type">String</span>,</span> <span style="white-space:nowrap">currentValue:<span class="type">String</span></span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="syncVarVector2"></a><h3 class="anchor"><code><a href="#syncVarVector2"><span class="identifier">syncVarVector2</span></a>(<span style="white-space:nowrap">variableName:<span class="type">String</span>,</span> <span style="white-space:nowrap">currentX:<span class="type">Float</span>,</span> <span style="white-space:nowrap">currentY:<span class="type">Float</span></span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="syncVelocity"></a><h3 class="anchor"><code><a href="#syncVelocity"><span class="identifier">syncVelocity</span></a>():<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="unparent"></a><h3 class="anchor"><code><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value({ network : true })</span><a href="#unparent"><span class="identifier">unparent</span></a>(<span style="white-space:nowrap">network:<span class="type">Bool</span> = true</span>):<span class="type">Void</span></code></h3><div class="doc"><p>Removes this object from the parent's <code>children</code> group.</p>
<p>Advisable to use when you intend to get rid of this object entirely after <code>kill</code>ing it. Otherwise, if the parent object gets revived, this object will be revived as well.</p></div></div></div></div></div></div></div></div></div><footer class="section site-footer" style="background:#FAFAFA"><div class="container"><div class="copyright"><p style="color:#000000">This documentation is generated for version 0.1.4</p><p style="color:#000000">© 2024 <a style="color:#000000" href="https://themysticsword.itch.io/mechanism-that-brings-disaster">https://themysticsword.itch.io/mechanism-that-brings-disaster</a></p></div></div></footer><script src=".//highlighter.js"></script><link href="./highlighter.css" rel="stylesheet"/></body></html>