MusicBeatSubstate
| Kind | class |
| Package | backend |
| Full name | backend.MusicBeatSubstate |
| Source | source/backend/MusicBeatSubstate.hx |
| Extends | FlxSubState |
Known subclasses: Prompt, BaseOptionsMenu, ControlsSubState, NotesSubState, CustomSubstate, CustomFadeTransition, ResetAchievementSubstate, RenderingDoneSubState, GameOverSubstate, GameplayChangersSubstate, ModSubState, PauseSubState, ResetScoreSubState
Public fields
| Name | Type | Static | Default | Notes |
|---|---|---|---|---|
scriptsAllowed | Bool | no | true | When false, data/states/<Name>.hx is not loaded for this instance. |
scriptName | String | no | null | Override the data/states/ file stem. Defaults to the class name. |
stateScripts | StateScripts | no | — | HScript pack loaded from data/states/. |
virtualPad | FlxVirtualPad | no | — | — |
Public methods
new (constructor)
function new()
callStateScript
function callStateScript(name:String, ?args:Array<Dynamic>):Dynamic
| Parameter | Type | Default |
|---|---|---|
name | String | — |
args (optional) | Array<Dynamic> | — |
addVirtualPad
function addVirtualPad(DPad:FlxDPadMode, Action:FlxActionMode):Void
| Parameter | Type | Default |
|---|---|---|
DPad | FlxDPadMode | — |
Action | FlxActionMode | — |
removeVirtualPad
function removeVirtualPad():Void
addVirtualPadCamera
function addVirtualPadCamera(DefaultDrawTarget:Bool = false):Void
| Parameter | Type | Default |
|---|---|---|
DefaultDrawTarget (optional) | Bool | false |
stepHit
function stepHit():Void
beatHit
function beatHit():Void
Internals
Private / internal members
| Field | Type | Static |
|---|---|---|
_stateScriptsPostCreate | Bool | no |
lastBeat | Float | no |
lastStep | Float | no |
curStep | Int | no |
curBeat | Int | no |
oldStep | Int | no |
curDecStep | Float | no |
curDecBeat | Float | no |
controls | Controls | no |
virtualPadCamera | FlxCamera | no |
trackedInputsVirtualPad | Array<FlxActionInput> | no |
| Method |
|---|
function loadStateScripts():Void |
override function create() |
override function close() |
inline function get_controls():Controls |
override function destroy():Void |
override function update(elapsed:Float) |
function updateBeat():Void |
function updateCurStep():Void |