Files
CodenameEngine/pages/scripting/CharacterScript.html
T
2022-10-11 13:47:52 +02:00

12 lines
7.0 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.CharacterScript</title><meta name="description" content="Contains all callbacks you can add in a Character script."/></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> CharacterScript</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 a Character script.</p>
<p>To add a Character script, create a file here: <code>data/characters/my-char.hx</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></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 XML has been loaded.</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 after the character has been entirely loaded.</p></div></div><div class="field "><a name="onDance"></a><h3 class="anchor"><code><a href="#onDance"><span class="identifier">onDance</span></a>(<span style="white-space:nowrap">event:<a class="type" title="funkin.scripting.events.DanceEvent" href="../funkin/scripting/events/DanceEvent.html">DanceEvent</a></span>):<span class="type">Void</span></code></h3><div class="doc"><p>Triggered everytime the character will dance (play its idle animation).</p></div></div><div class="field "><a name="onGetCamPos"></a><h3 class="anchor"><code><a href="#onGetCamPos"><span class="identifier">onGetCamPos</span></a>(<span style="white-space:nowrap">event:<a class="type" title="funkin.scripting.events.PointEvent" href="../funkin/scripting/events/PointEvent.html">PointEvent</a></span>):<span class="type">Void</span></code></h3><div class="doc"><p>Triggered everytime the game tries to get your player's camera position.
This event cannot be cancelled.</p></div></div><div class="field "><a name="onPlayAnim"></a><h3 class="anchor"><code><a href="#onPlayAnim"><span class="identifier">onPlayAnim</span></a>(<span style="white-space:nowrap">event:<a class="type" title="funkin.scripting.events.PlayAnimEvent" href="../funkin/scripting/events/PlayAnimEvent.html">PlayAnimEvent</a></span>):<span class="type">Void</span></code></h3><div class="doc"><p>Triggered everytime the game tries to play an animation on your character.</p></div></div><div class="field "><a name="onPlaySingAnim"></a><h3 class="anchor"><code><a href="#onPlaySingAnim"><span class="identifier">onPlaySingAnim</span></a>(<span style="white-space:nowrap">event:<a class="type" title="funkin.scripting.events.DirectionAnimEvent" href="../funkin/scripting/events/DirectionAnimEvent.html">DirectionAnimEvent</a></span>):<span class="type">Void</span></code></h3><div class="doc"><p>Triggered everytime the game tries to play a sing, alt sing or miss animation.</p></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></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></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; 2022 &nbsp;</p></div></div></footer><script src="..//highlighter.js"></script><link href="../highlighter.css" rel="stylesheet"/></body></html>