class Module
package funkin.modding.module
implements ICharacterSelectScriptedClass, IFreeplayScriptedClass, IStateChangingScriptedClass, IPlayStateScriptedClass
extended by ScriptedModule
Available on all platforms
A module is a scripted class which receives all events without requiring a specific context. You may have the module active at all times, or only when another script enables it.
Constructor
new(moduleId:String, priority:Int = 1000, ?params:Null<ModuleParams>)
Called when the module is initialized. It may not be safe to reference other modules here since they may not be loaded yet.
NOTE: To make the module start inactive, call this.active = false in the constructor.
Variables
priority:Int = 1000
Determines the order in which modules receive events. You can modify this to change the order in which a given module receives events.
Priority 1 is processed before Priority 1000, etc.
state:Null<Class<Dynamic>> = null
The state this module is associated with. If set, this module will only receive events when the game is in this state.
Methods
onCharacterConfirm(event:CharacterSelectScriptEvent):Void
Called when a character has been confirmed.
onCharacterDeselect(event:CharacterSelectScriptEvent):Void
Called when the user presses BACK after confirming a character.
onCountdownEnd(event:CountdownScriptEvent):Void
Called when the countdown ends, but BEFORE the song starts.
onCreate(event:ScriptEvent):Void
Called when the module is first created. This happens before the title screen appears!
onDestroy(event:ScriptEvent):Void
Called when a module is destroyed. This currently only happens when reloading modules with F5.
onFocusGained(event:FocusScriptEvent):Void
Called when the game regains focus. This does not get called if "Pause on Unfocus" is disabled.
onFocusLost(event:FocusScriptEvent):Void
Called when the game loses focus. This does not get called if "Pause on Unfocus" is disabled.
onNoteGhostMiss(event:GhostMissNoteScriptEvent):Void
Called when the player presses a key without any notes present.
onNoteHit(event:HitNoteScriptEvent):Void
Called when a note has been hit. This gets dispatched for both the player and opponent strumlines.
onNoteIncoming(event:NoteScriptEvent):Void
Called when a note on the strumline has been rendered and is now onscreen. This gets dispatched for both the player and opponent strumlines.
onNoteMiss(event:NoteScriptEvent):Void
Called when a note has been missed. This gets dispatched for both the player and opponent strumlines.
onSongLoaded(event:SongLoadScriptEvent):Void
Called when the song's chart has been parsed and loaded.
onStateChangeBegin(event:StateChangeScriptEvent):Void
Called when the game is about to switch to a new state.
onStateChangeEnd(event:StateChangeScriptEvent):Void
Called after the game has switched to a new state.
onSubStateCloseBegin(event:SubStateScriptEvent):Void
Called when the game is about to close a substate.
onSubStateOpenBegin(event:SubStateScriptEvent):Void
Called when the game is about to open a substate.