Known subclasses: Crash, CharacterEditorState, ChartingState, DialogueCharacterEditorState, DialogueEditorState, EditorPlayState, MasterEditorMenu, MenuCharacterEditorState, NoteSplashDebugState, WeekEditorState, WeekEditorFreeplayState, CopyState, NoteOffsetState, OptionsState, PlayState, AchievementsMenuState, CreditsState, ErrorState, FlashingState, FreeplayState, LoadingState, MainMenuState, ModState, ModsMenuState, ModsMenuState, OutdatedState, StartupState, StoryMenuState, TitleState
Public fields
| Name | Type | Static | Default | Notes |
|---|
camBeat | FlxCamera | yes | — | — |
virtualPad | FlxVirtualPad | no | — | — |
windowNameSuffix | String | yes | "" | property (default, set) |
windowNameSuffix2 | String | yes | "" | property (default, set) |
windowNamePrefix | String | yes | "Friday Night Funkin' - Phoenix Engine" | — |
variables | Map<String, Dynamic> | no | new Map<String, Dynamic>() | — |
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/. |
stages | Array<BaseStage> | no | [] | — |
Public methods
addVirtualPad
function addVirtualPad(DPad:FlxDPadMode, Action:FlxActionMode):Void
| Parameter | Type | Default |
|---|
DPad | FlxDPadMode | — |
Action | FlxActionMode | — |
View source
removeVirtualPad
function removeVirtualPad():Void
View source
addMobileControls
function addMobileControls(DefaultDrawTarget:Bool = false):Void
| Parameter | Type | Default |
|---|
DefaultDrawTarget (optional) | Bool | false |
View source
removeMobileControls
function removeMobileControls():Void
View source
addVirtualPadCamera
function addVirtualPadCamera(DefaultDrawTarget:Bool = false):Void
| Parameter | Type | Default |
|---|
DefaultDrawTarget (optional) | Bool | false |
View source
getVariables
static function getVariables()
View source
new (constructor)
this is just because FlxUIState has arguments in it's constructor
View source
callStateScript
function callStateScript(name:String, ?args:Array<Dynamic>):Dynamic
| Parameter | Type | Default |
|---|
name | String | — |
args (optional) | Array<Dynamic> | — |
View source
initPsychCamera
function initPsychCamera():PsychCamera
View source
stepHit
runs whenever the game hits a step
View source
beatHit
runs whenever the game hits a beat
View source
sectionHit
function sectionHit():Void
runs whenever the game hits a section
View source
getState
static function getState():MusicBeatState
View source
Internals
Private / internal members
| Field | Type | Static |
|---|
curSection | Int | no |
stepsToDo | Int | no |
curStep | Int | no |
curBeat | Int | no |
oldStep | Int | no |
curDecStep | Float | no |
curDecBeat | Float | no |
controls | Controls | no |
mobileControls | MobileControls | no |
mobileControlsCamera | FlxCamera | no |
virtualPadCamera | FlxCamera | no |
trackedInputsMobileControls | Array<FlxActionInput> | no |
trackedInputsVirtualPad | Array<FlxActionInput> | no |
_psychCameraInitialized | Bool | no |
_stateScriptsPostCreate | Bool | no |
| Method |
|---|
inline function get_controls():Controls |
override function destroy():Void |
static function set_windowNameSuffix(value:String) |
static function set_windowNameSuffix2(value:String) |
function loadStateScripts():Void |
override function create() |
override function update(elapsed:Float) |
function updateSection():Void |
function rollbackSection():Void |
function updateBeat():Void |
function updateCurStep():Void |
override function startOutro(onOutroComplete:()->Void):Void |
function stagesFunc(func:BaseStage->Void) |
function getBeatsOnSection() |