10 lines
24 KiB
HTML
Vendored
10 lines
24 KiB
HTML
Vendored
<!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: ["doc"]};</script><script src="../../nav.js"></script><script src="../../index.js"></script><link rel="icon" href="../../favicon.ico" type="image/x-icon"/><title>funkin.menus.FreeplayState</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> FreeplayState</h1><h4><small>package <a href="../../funkin/menus/index.html">funkin.menus</a></small></h4><h4><small>extends <a class="type" title="funkin.system.MusicBeatState" href="../../funkin/system/MusicBeatState.html">MusicBeatState</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">Static variables</h3><div class="fields"><div class="field "><a name="defaultColor"></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(0xFF9271FD)</span><span class="label label-static">static</span><span class="label label-inline">inline</span><span class="label">read only</span><a href="#defaultColor"><span class="identifier">defaultColor</span></a>:<span class="type">FlxColor</span><span> = 0xFF9271FD</span></code></h3><div class="doc"><p>Default background colors for songs without bg color</p></div></div><div class="field "><a name="timeUntilAutoplay"></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 label-static">static</span><span class="label label-inline">inline</span><span class="label">read only</span><a href="#timeUntilAutoplay"><span class="identifier">timeUntilAutoplay</span></a>:<span class="type">Float</span><span> = 1</span></code></h3><div class="doc"><p>How much time a song stays selected until it autoplays.</p></div></div></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">?scriptsAllowed:<span class="type">Bool</span>,</span> <span style="white-space:nowrap">?scriptName:<span class="type">String</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="autoplayElapsed"></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="#autoplayElapsed"><span class="identifier">autoplayElapsed</span></a>:<span class="type">Float</span><span> = 0</span></code></h3><div class="doc"><p>Time elapsed since last autoplay. If this time exceeds <code>timeUntilAutoplay</code>, the currently selected song will play.</p></div></div><div class="field "><a name="bg"></a><h3 class="anchor"><code><a href="#bg"><span class="identifier">bg</span></a>:<span class="type">FlxSprite</span></code></h3><div class="doc"><p>Background.</p></div></div><div class="field "><a name="canSelect"></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="#canSelect"><span class="identifier">canSelect</span></a>:<span class="type">Bool</span><span> = true</span></code></h3><div class="doc"><p>Whenever the player can navigate and select</p></div></div><div class="field "><a name="coopLabels"></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(["[TAB] Solo", "[TAB] Opponent Mode", "[TAB] Co-Op Mode", "[TAB] Co-Op Mode (Switched)"])</span><a href="#coopLabels"><span class="identifier">coopLabels</span></a>:<span class="type">Array</span><<span class="type">String</span>><span> = ["[TAB] Solo", "[TAB] Opponent Mode", "[TAB] Co-Op Mode", "[TAB] Co-Op Mode (Switched)"]</span></code></h3><div class="doc"><p>Array containing all labels for Co-Op / Opponent modes.</p></div></div><div class="field "><a name="coopText"></a><h3 class="anchor"><code><a href="#coopText"><span class="identifier">coopText</span></a>:<span class="type">FlxText</span></code></h3><div class="doc"><p>Text containing the current coop/opponent mode ([TAB] Co-Op mode)</p></div></div><div class="field "><a name="curCoopMode"></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="#curCoopMode"><span class="identifier">curCoopMode</span></a>:<span class="type">Int</span><span> = 0</span></code></h3><div class="doc"><p>Currently selected coop/opponent mode</p></div></div><div class="field "><a name="curDifficulty"></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><a href="#curDifficulty"><span class="identifier">curDifficulty</span></a>:<span class="type">Int</span><span> = 1</span></code></h3><div class="doc"><p>Currently selected difficulty</p></div></div><div class="field "><a name="curPlaying"></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="#curPlaying"><span class="identifier">curPlaying</span></a>:<span class="type">Bool</span><span> = false</span></code></h3><div class="doc"><p>Whenever the currently selected song is playing.</p></div></div><div class="field "><a name="curPlayingInst"></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(null)</span><a href="#curPlayingInst"><span class="identifier">curPlayingInst</span></a>:<span class="type">String</span><span> = null</span></code></h3><div class="doc"><p>Path to the currently playing song instrumental.</p></div></div><div class="field "><a name="curSelected"></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="#curSelected"><span class="identifier">curSelected</span></a>:<span class="type">Int</span><span> = 0</span></code></h3><div class="doc"><p>Currently selected song</p></div></div><div class="field "><a name="diffText"></a><h3 class="anchor"><code><a href="#diffText"><span class="identifier">diffText</span></a>:<span class="type">FlxText</span></code></h3><div class="doc"><p>Text containing the current difficulty (< HARD >)</p></div></div><div class="field "><a name="grpSongs"></a><h3 class="anchor"><code><a href="#grpSongs"><span class="identifier">grpSongs</span></a>:<span class="type">FlxTypedGroup</span><<a class="type" title="funkin.ui.Alphabet" href="../../funkin/ui/Alphabet.html">Alphabet</a>></code></h3><div class="doc"><p>Group containing all of the alphabets</p></div></div><div class="field "><a name="iconArray"></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="#iconArray"><span class="identifier">iconArray</span></a>:<span class="type">Array</span><<a class="type" title="funkin.game.HealthIcon" href="../../funkin/game/HealthIcon.html">HealthIcon</a>><span> = []</span></code></h3><div class="doc"><p>Array containing all of the icons.</p></div></div><div class="field "><a name="intendedScore"></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="#intendedScore"><span class="identifier">intendedScore</span></a>:<span class="type">Int</span><span> = 0</span></code></h3><div class="doc"><p>Destination for the currently lerped score.</p></div></div><div class="field "><a name="lerpScore"></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="#lerpScore"><span class="identifier">lerpScore</span></a>:<span class="type">Int</span><span> = 0</span></code></h3><div class="doc"><p>Currently lerped score. Is updated to go towards <code>intendedScore</code>.</p></div></div><div class="field "><a name="scoreBG"></a><h3 class="anchor"><code><a href="#scoreBG"><span class="identifier">scoreBG</span></a>:<span class="type">FlxSprite</span></code></h3><div class="doc"><p>Black background around the score, the difficulty text and the co-op text.</p></div></div><div class="field "><a name="scoreText"></a><h3 class="anchor"><code><a href="#scoreText"><span class="identifier">scoreText</span></a>:<span class="type">FlxText</span></code></h3><div class="doc"><p>Text containing the score info (PERSONAL BEST: 0)</p></div></div><div class="field "><a name="songInstPlaying"></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="#songInstPlaying"><span class="identifier">songInstPlaying</span></a>:<span class="type">Bool</span><span> = true</span></code></h3><div class="doc"><p>Whenever the currently selected song instrumental is playing.</p></div></div><div class="field "><a name="songList"></a><h3 class="anchor"><code><a href="#songList"><span class="identifier">songList</span></a>:<a class="type" title="funkin.menus.FreeplaySonglist" href="../../funkin/menus/FreeplaySonglist.html">FreeplaySonglist</a></code></h3><div class="doc"><p>Assigned FreeplaySonglist item.</p></div></div><div class="field "><a name="songs"></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="#songs"><span class="identifier">songs</span></a>:<span class="type">Array</span><<a class="type" title="funkin.menus.SongMetadata" href="../../funkin/menus/SongMetadata.html">SongMetadata</a>><span> = []</span></code></h3><div class="doc"><p>Array containing all of the songs metadatas</p></div></div></div><h3 class="section">Methods</h3><div class="fields"><div class="field "><a name="changeCoopMode"></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({ force : false, change : 0 })</span><a href="#changeCoopMode"><span class="identifier">changeCoopMode</span></a>(<span style="white-space:nowrap">change:<span class="type">Int</span> = 0,</span> <span style="white-space:nowrap">force:<span class="type">Bool</span> = false</span>):<span class="type">Void</span></code></h3><div class="doc"><p>Change the current coop mode context.</p><p class="javadoc">Parameters:</p><table class="table table-bordered params"><tr><th style="width:25%;"><code>change</code></th><td><p>How much to change</p></td></tr><tr><th style="width:25%;"><code>force</code></th><td><p>Force the change, even if <code>change</code> is equal to 0.</p></td></tr></table></div></div><div class="field "><a name="changeDiff"></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({ force : false, change : 0 })</span><a href="#changeDiff"><span class="identifier">changeDiff</span></a>(<span style="white-space:nowrap">change:<span class="type">Int</span> = 0,</span> <span style="white-space:nowrap">force:<span class="type">Bool</span> = false</span>):<span class="type">Void</span></code></h3><div class="doc"><p>Changes the current difficulty</p><p class="javadoc">Parameters:</p><table class="table table-bordered params"><tr><th style="width:25%;"><code>change</code></th><td><p>How much to change.</p></td></tr><tr><th style="width:25%;"><code>force</code></th><td><p>Force the change if <code>change</code> is equal to 0</p></td></tr></table></div></div><div class="field "><a name="changeSelection"></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({ force : false, change : 0 })</span><a href="#changeSelection"><span class="identifier">changeSelection</span></a>(<span style="white-space:nowrap">change:<span class="type">Int</span> = 0,</span> <span style="white-space:nowrap">force:<span class="type">Bool</span> = false</span>):<span class="type">Void</span></code></h3><div class="doc"><p>Change the current selection.</p><p class="javadoc">Parameters:</p><table class="table table-bordered params"><tr><th style="width:25%;"><code>change</code></th><td><p>How much to change</p></td></tr><tr><th style="width:25%;"><code>force</code></th><td><p>Force the change, even if <code>change</code> is equal to 0.</p></td></tr></table></div></div><div class="field "><a name="select"></a><h3 class="anchor"><code><a href="#select"><span class="identifier">select</span></a>():<span class="type">Void</span></code></h3><div class="doc"><p>Selects the current song.</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="funkin.system.MusicBeatState" href="../../funkin/system/MusicBeatState.html">MusicBeatState</a></h4><div style="display:none"><div class="field "><a name="cancelConductorUpdate"></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="#cancelConductorUpdate"><span class="identifier">cancelConductorUpdate</span></a>:<span class="type">Bool</span><span> = false</span></code></h3><div class="doc"><p>Whenever the Conductor auto update should be enabled or not.</p></div></div><div class="field "><a name="controls"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#controls"><span class="identifier">controls</span></a>:<a class="type" title="funkin.system.Controls - A list of actions that a player would invoke via some input device." href="../../funkin/system/Controls.html">Controls</a></code></h3><div class="doc"><p>Game Controls. (All players / Solo)</p></div></div><div class="field "><a name="controlsP1"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#controlsP1"><span class="identifier">controlsP1</span></a>:<a class="type" title="funkin.system.Controls - A list of actions that a player would invoke via some input device." href="../../funkin/system/Controls.html">Controls</a></code></h3><div class="doc"><p>Game Controls (Player 1 only)</p></div></div><div class="field "><a name="controlsP2"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#controlsP2"><span class="identifier">controlsP2</span></a>:<a class="type" title="funkin.system.Controls - A list of actions that a player would invoke via some input device." href="../../funkin/system/Controls.html">Controls</a></code></h3><div class="doc"><p>Game Controls (Player 2 only)</p></div></div><div class="field "><a name="curBeat"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#curBeat"><span class="identifier">curBeat</span></a>:<span class="type">Int</span></code></h3><div class="doc"><p>Current beat</p></div></div><div class="field "><a name="curBeatFloat"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#curBeatFloat"><span class="identifier">curBeatFloat</span></a>:<span class="type">Float</span></code></h3><div class="doc"><p>Current beat, as a <code>Float</code> (ex: 1.24, instead of 1)</p></div></div><div class="field "><a name="curMeasure"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#curMeasure"><span class="identifier">curMeasure</span></a>:<span class="type">Int</span></code></h3><div class="doc"><p>Current beat</p></div></div><div class="field "><a name="curMeasureFloat"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#curMeasureFloat"><span class="identifier">curMeasureFloat</span></a>:<span class="type">Float</span></code></h3><div class="doc"><p>Current beat, as a <code>Float</code> (ex: 1.24, instead of 1)</p></div></div><div class="field "><a name="curStep"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#curStep"><span class="identifier">curStep</span></a>:<span class="type">Int</span></code></h3><div class="doc"><p>Current step</p></div></div><div class="field "><a name="curStepFloat"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#curStepFloat"><span class="identifier">curStepFloat</span></a>:<span class="type">Float</span></code></h3><div class="doc"><p>Current step, as a <code>Float</code> (ex: 4.94, instead of 4)</p></div></div><div class="field "><a name="scriptName"></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(null)</span><a href="#scriptName"><span class="identifier">scriptName</span></a>:<span class="type">String</span><span> = null</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="scriptsAllowed"></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="#scriptsAllowed"><span class="identifier">scriptsAllowed</span></a>:<span class="type">Bool</span><span> = true</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="songPos"></a><h3 class="anchor"><code><span class="label">read only</span><a href="#songPos"><span class="identifier">songPos</span></a>:<span class="type">Float</span></code></h3><div class="doc"><p>Current song position (in milliseconds).</p></div></div><div class="field "><a name="stateScript"></a><h3 class="anchor"><code><a href="#stateScript"><span class="identifier">stateScript</span></a>:<a class="type" title="funkin.scripting.Script - Class used for scripting." href="../../funkin/scripting/Script.html">Script</a></code></h3><div class="doc"><p>Current injected script attached to the state. To add one, create a file at path "data/states/stateName" (ex: data/states/FreeplayState)</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="funkin.system.MusicBeatState" href="../../funkin/system/MusicBeatState.html">MusicBeatState</a></h4><div style="display:none"><div class="field "><a name="call"></a><h3 class="anchor"><code><a href="#call"><span class="identifier">call</span></a>(<span style="white-space:nowrap">name:<span class="type">String</span>,</span> <span style="white-space:nowrap">?args:<span class="type">Array</span><<span class="type">Dynamic</span>>,</span> <span style="white-space:nowrap">?defaultVal:<span class="type">Dynamic</span></span>):<span class="type">Dynamic</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="event"></a><h3 class="anchor"><code><a href="#event"><span class="identifier">event</span></a><<span class="type">T</span>>(<span style="white-space:nowrap">name:<span class="type">String</span>,</span> <span style="white-space:nowrap">event:<span class="type">T</span></span>):<span class="type">T</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="lerp"></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({ fpsSensitive : false })</span><a href="#lerp"><span class="identifier">lerp</span></a>(<span style="white-space:nowrap">v1:<span class="type">Float</span>,</span> <span style="white-space:nowrap">v2:<span class="type">Float</span>,</span> <span style="white-space:nowrap">ratio:<span class="type">Float</span>,</span> <span style="white-space:nowrap">fpsSensitive:<span class="type">Bool</span> = false</span>):<span class="type">Float</span></code></h3><div class="doc"><p>Shortcut to <code>FlxMath.lerp</code> or <code><a href="../../funkin/utils/CoolUtil.html#lerp">CoolUtil.lerp</a></code>, depending on <code>fpsSensitive</code></p><p class="javadoc">Parameters:</p><table class="table table-bordered params"><tr><th style="width:25%;"><code>v1</code></th><td><p>Value 1</p></td></tr><tr><th style="width:25%;"><code>v2</code></th><td><p>Value 2</p></td></tr><tr><th style="width:25%;"><code>ratio</code></th><td><p>Ratio</p></td></tr><tr><th style="width:25%;"><code>fpsSensitive</code></th><td><p>Whenever the ratio should not be adjusted to run at the same speed independent of framerate.</p></td></tr></table></div></div><div class="field "><a name="openSubState"></a><h3 class="anchor"><code><a href="#openSubState"><span class="identifier">openSubState</span></a>(<span style="white-space:nowrap">subState:<span class="type">FlxSubState</span></span>):<span class="type">Void</span></code></h3><div class="doc"><p>SCRIPTING STUFF</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">© 2023 </p></div></div></footer><script src="../..//highlighter.js"></script><link href="../../highlighter.css" rel="stylesheet"/></body></html> |