12 lines
9.1 KiB
HTML
12 lines
9.1 KiB
HTML
<!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>scripting.PlayStateScript</title><meta name="description" content="Contains all callbacks you can add in modcharts and stage scripts."/></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>interface</small> PlayStateScript</h1><h4><small>package <a href="../scripting/index.html">scripting</a></small></h4> <span class="label label-meta label-meta-hxGen" title="Annotates that an extern class was generated by Haxe.">@:hxGen</span></div><div class="body"><div class="doc doc-main"><p>Contains all callbacks you can add in modcharts and stage scripts.</p>
|
|
<p>NOTE: In case you're scripting a stage, all sprites of that stage are directly accessible via their name.</p>
|
|
<p>Ex: If you added a <code>superCoolBG</code> element in your stage XML, you'll be able to access it via scripts by using <code>superCoolBG</code>.</p></div><h3 class="section">Methods</h3><div class="fields"><div class="field "><a name="beatHit"></a><h3 class="anchor"><code><a href="#beatHit"><span class="identifier">beatHit</span></a>(<span style="white-space:nowrap">curBeat:<span class="type">Int</span></span>):<span class="type">Void</span></code></h3><div class="doc"><p>Triggered every beat.</p><p class="javadoc">Parameters:</p><table class="table table-bordered params"><tr><th style="width:25%;"><code>curBeat</code></th><td><p>Current beat.</p></td></tr></table></div></div><div class="field "><a name="create"></a><h3 class="anchor"><code><a href="#create"><span class="identifier">create</span></a>():<span class="type">Void</span></code></h3><div class="doc"><p>Triggered after the characters has been created, during PlayState's creation.</p></div></div><div class="field "><a name="createPost"></a><h3 class="anchor"><code><a href="#createPost"><span class="identifier">createPost</span></a>():<span class="type">Void</span></code></h3><div class="doc"><p>Triggered at the very end of PlayState's creation</p></div></div><div class="field "><a name="inputUpdate"></a><h3 class="anchor"><code><a href="#inputUpdate"><span class="identifier">inputUpdate</span></a>(<span style="white-space:nowrap">note:<a class="type" title="funkin.scripting.events.InputSystemEvent" href="../funkin/scripting/events/InputSystemEvent.html">InputSystemEvent</a></span>):<span class="type">Void</span></code></h3><div class="doc"><p>Triggered whenever the input system updates.</p><p class="javadoc">Parameters:</p><table class="table table-bordered params"><tr><th style="width:25%;"><code>note</code></th><td><p>Event object with the pressed notes, which allows you to alter which notes are being pressed during this frame, or simply cancel the input update.</p></td></tr></table></div></div><div class="field "><a name="inputUpdatePost"></a><h3 class="anchor"><code><a href="#inputUpdatePost"><span class="identifier">inputUpdatePost</span></a>(<span style="white-space:nowrap">note:<a class="type" title="funkin.scripting.events.InputSystemEvent" href="../funkin/scripting/events/InputSystemEvent.html">InputSystemEvent</a></span>):<span class="type">Void</span></code></h3><div class="doc"><p>Triggered after the input system updates.</p><p class="javadoc">Parameters:</p><table class="table table-bordered params"><tr><th style="width:25%;"><code>note</code></th><td><p>Event object with the pressed, justPressed and justReleased notes.</p></td></tr></table></div></div><div class="field "><a name="onDadHit"></a><h3 class="anchor"><code><a href="#onDadHit"><span class="identifier">onDadHit</span></a>(<span style="white-space:nowrap">note:<a class="type" title="funkin.scripting.events.NoteHitEvent" href="../funkin/scripting/events/NoteHitEvent.html">NoteHitEvent</a></span>):<span class="type">Void</span></code></h3><div class="doc"><p>Triggered whenever the opponent hits a note.</p><p class="javadoc">Parameters:</p><table class="table table-bordered params"><tr><th style="width:25%;"><code>note</code></th><td><p>Event object with the note being pressed, the character who pressed it, and functions to alter or cancel the default behaviour.</p></td></tr></table></div></div><div class="field "><a name="onPlayerHit"></a><h3 class="anchor"><code><a href="#onPlayerHit"><span class="identifier">onPlayerHit</span></a>(<span style="white-space:nowrap">note:<a class="type" title="funkin.scripting.events.NoteHitEvent" href="../funkin/scripting/events/NoteHitEvent.html">NoteHitEvent</a></span>):<span class="type">Void</span></code></h3><div class="doc"><p>Triggered whenever the player hits a note.</p><p class="javadoc">Parameters:</p><table class="table table-bordered params"><tr><th style="width:25%;"><code>note</code></th><td><p>Event object with the note being pressed, the character who pressed it, and functions to alter or cancel the default behaviour.</p></td></tr></table></div></div><div class="field "><a name="stepHit"></a><h3 class="anchor"><code><a href="#stepHit"><span class="identifier">stepHit</span></a>(<span style="white-space:nowrap">curStep:<span class="type">Int</span></span>):<span class="type">Void</span></code></h3><div class="doc"><p>Triggered every step</p><p class="javadoc">Parameters:</p><table class="table table-bordered params"><tr><th style="width:25%;"><code>curStep</code></th><td><p>Current step.</p></td></tr></table></div></div><div class="field "><a name="update"></a><h3 class="anchor"><code><a href="#update"><span class="identifier">update</span></a>(<span style="white-space:nowrap">elapsed:<span class="type">Float</span></span>):<span class="type">Void</span></code></h3><div class="doc"><p>Triggered every frame.</p><p class="javadoc">Parameters:</p><table class="table table-bordered params"><tr><th style="width:25%;"><code>elapsed</code></th><td><p>Time elapsed since last frame.</p></td></tr></table></div></div><div class="field "><a name="updatePost"></a><h3 class="anchor"><code><a href="#updatePost"><span class="identifier">updatePost</span></a>(<span style="white-space:nowrap">elapsed:<span class="type">Float</span></span>):<span class="type">Void</span></code></h3><div class="doc"><p>Triggered at the end of every frame.</p><p class="javadoc">Parameters:</p><table class="table table-bordered params"><tr><th style="width:25%;"><code>elapsed</code></th><td><p>Time elapsed since last frame.</p></td></tr></table></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">© 2022 </p></div></div></footer><script src="..//highlighter.js"></script><link href="../highlighter.css" rel="stylesheet"/></body></html> |