Files
CodenameEngine/pages/funkin/game/StrumLine.html
T
2023-04-01 18:29:11 +02:00

16 lines
13 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.game.StrumLine</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> StrumLine</h1><h4><small>package <a href="../../funkin/game/index.html">funkin.game</a></small></h4><h4><small>extends <span class="type">FlxTypedGroup</span></small></h4> <span class="label label-meta label-meta-directlyUsed" title="Marks types that are directly referenced by non-extern code.">@:directlyUsed</span><span class="label label-meta label-meta-build" title="Builds a class or enum from a macro.">@:build(hscript.ClassExtendMacro.build())</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><span class="label label-meta label-meta-value" title="Used to store default values for fields and function arguments.">@:value({ opponentSide : true, cpu : false, strumOffset : 0.25 })</span><a href="#new"><span class="identifier">new</span></a>(<span style="white-space:nowrap">characters:<span class="type">Array</span>&lt;<a class="type" title="funkin.game.Character" href="../../funkin/game/Character.html">Character</a>&gt;,</span> <span style="white-space:nowrap">strumOffset:<span class="type">Float</span> = 0.25,</span> <span style="white-space:nowrap">cpu:<span class="type">Bool</span> = false,</span> <span style="white-space:nowrap">opponentSide:<span class="type">Bool</span> = true,</span> <span style="white-space:nowrap">?controls:<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></span>)</code></h3><div class="doc"><p></p></div></div></div><h3 class="section">Variables</h3><div class="fields"><div class="field "><a name="characters"></a><h3 class="anchor"><code><a href="#characters"><span class="identifier">characters</span></a>:<span class="type">Array</span>&lt;<a class="type" title="funkin.game.Character" href="../../funkin/game/Character.html">Character</a>&gt;</code></h3><div class="doc"><p>Array containing all of the characters "attached" to those strums.</p></div></div><div class="field "><a name="controls"></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="#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><span> = null</span></code></h3><div class="doc"><p>Controls assigned to this strumline.</p></div></div><div class="field "><a name="cpu"></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="#cpu"><span class="identifier">cpu</span></a>:<span class="type">Bool</span><span> = false</span></code></h3><div class="doc"><p>Whenever this strumline is controlled by cpu or not.</p></div></div><div class="field "><a name="data"></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="#data"><span class="identifier">data</span></a>:<a class="type" title="funkin.chart.ChartStrumLine" href="../../funkin/chart/ChartStrumLine.html">ChartStrumLine</a><span> = null</span></code></h3><div class="doc"><p>Chart JSON data assigned to this StrumLine (Codename format)</p></div></div><div class="field "><a name="ghostTapping"></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><span class="label label-meta label-meta-isVar" title="Forces a physical field to be generated for properties that otherwise would not require one.">@:isVar</span><a href="#ghostTapping"><span class="identifier">ghostTapping</span></a>:<span class="type">Null</span>&lt;<span class="type">Bool</span>&gt;<span> = null</span></code></h3><div class="doc"><p>Whenever Ghost Tapping is enabled.</p></div></div><div class="field "><a name="notes"></a><h3 class="anchor"><code><a href="#notes"><span class="identifier">notes</span></a>:<a class="type" title="funkin.game.NoteGroup" href="../../funkin/game/NoteGroup.html">NoteGroup</a></code></h3><div class="doc"><p>Group of all of the notes in this strumline. Using <code>forEach</code> on this group will only loop through the first notes for performance reasons.</p></div></div><div class="field "><a name="onHit"></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 FlxTypedSignal&lt;NoteHitEvent&gt;())</span><a href="#onHit"><span class="identifier">onHit</span></a>:<span class="type">FlxTypedSignal</span>&lt;<a class="type" title="funkin.scripting.events.NoteHitEvent" href="../../funkin/scripting/events/NoteHitEvent.html">NoteHitEvent</a>&nbsp;&#8209;&gt;&nbsp;<span class="type">Void</span>&gt;<span> = new FlxTypedSignal&lt;NoteHitEvent&gt;()</span></code></h3><div class="doc"><p>Signal that triggers whenever a note is hit. Similar to onPlayerHit and onDadHit, except strumline specific.
To add a listener, do
<code>strumLine.onHit.add(function(e:<a href="../../funkin/scripting/events/NoteHitEvent.html#NoteHitEvent">NoteHitEvent</a>) {});</code></p></div></div><div class="field "><a name="onMiss"></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 FlxTypedSignal&lt;NoteHitEvent&gt;())</span><a href="#onMiss"><span class="identifier">onMiss</span></a>:<span class="type">FlxTypedSignal</span>&lt;<a class="type" title="funkin.scripting.events.NoteHitEvent" href="../../funkin/scripting/events/NoteHitEvent.html">NoteHitEvent</a>&nbsp;&#8209;&gt;&nbsp;<span class="type">Void</span>&gt;<span> = new FlxTypedSignal&lt;NoteHitEvent&gt;()</span></code></h3><div class="doc"><p>Signal that triggers whenever a note is missed. Similar to onPlayerMiss and onDadMiss, except strumline specific.
To add a listener, do
<code>strumLine.onMiss.add(function(e:<a href="../../funkin/scripting/events/NoteHitEvent.html#NoteHitEvent">NoteHitEvent</a>) {});</code></p></div></div><div class="field "><a name="onNoteUpdate"></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 FlxTypedSignal&lt;NoteUpdateEvent&gt;())</span><a href="#onNoteUpdate"><span class="identifier">onNoteUpdate</span></a>:<span class="type">FlxTypedSignal</span>&lt;<a class="type" title="funkin.scripting.events.NoteUpdateEvent" href="../../funkin/scripting/events/NoteUpdateEvent.html">NoteUpdateEvent</a>&nbsp;&#8209;&gt;&nbsp;<span class="type">Void</span>&gt;<span> = new FlxTypedSignal&lt;NoteUpdateEvent&gt;()</span></code></h3><div class="doc"><p>Signal that triggers whenever a note is being updated. Similar to onNoteUpdate, except strumline specific.
To add a listener, do
<code>strumLine.onNoteUpdate.add(function(e:<a href="../../funkin/scripting/events/NoteUpdateEvent.html#NoteUpdateEvent">NoteUpdateEvent</a>) {});</code></p></div></div><div class="field "><a name="opponentSide"></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="#opponentSide"><span class="identifier">opponentSide</span></a>:<span class="type">Bool</span><span> = false</span></code></h3><div class="doc"><p>Whenever this strumline is from the opponent side or the player side.</p></div></div></div><h3 class="section">Methods</h3><div class="fields"><div class="field "><a name="addHealth"></a><h3 class="anchor"><code><span class="label label-inline">inline</span><a href="#addHealth"><span class="identifier">addHealth</span></a>(<span style="white-space:nowrap">health:<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="deleteNote"></a><h3 class="anchor"><code><a href="#deleteNote"><span class="identifier">deleteNote</span></a>(<span style="white-space:nowrap">note:<a class="type" title="funkin.game.Note" href="../../funkin/game/Note.html">Note</a></span>):<span class="type">Void</span></code></h3><div class="doc"><p>Deletes a note from this strumline.</p><p class="javadoc">Parameters:</p><table class="table table-bordered params"><tr><th style="width:25%;"><code>note</code></th><td><p>Note to delete</p></td></tr></table></div></div><div class="field "><a name="generate"></a><h3 class="anchor"><code><a href="#generate"><span class="identifier">generate</span></a>(<span style="white-space:nowrap">strumLine:<a class="type" title="funkin.chart.ChartStrumLine" href="../../funkin/chart/ChartStrumLine.html">ChartStrumLine</a></span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="generateStrums"></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({ amount : 4 })</span><a href="#generateStrums"><span class="identifier">generateStrums</span></a>(<span style="white-space:nowrap">amount:<span class="type">Int</span> = 4</span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="updateNote"></a><h3 class="anchor"><code><a href="#updateNote"><span class="identifier">updateNote</span></a>(<span style="white-space:nowrap">daNote:<a class="type" title="funkin.game.Note" href="../../funkin/game/Note.html">Note</a></span>):<span class="type">Void</span></code></h3><div class="doc"><p></p></div></div><div class="field "><a name="updateNotes"></a><h3 class="anchor"><code><a href="#updateNotes"><span class="identifier">updateNotes</span></a>():<span class="type">Void</span></code></h3><div class="doc"><p></p></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">&copy; 2023 &nbsp;</p></div></div></footer><script src="../..//highlighter.js"></script><link href="../../highlighter.css" rel="stylesheet"/></body></html>