This repository was archived by the owner on Dec 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Custom Substate Script
skellypupper edited this page May 20, 2023
·
5 revisions
Empty Script
An example substate script can be found here.
function create() {}
function update(elapsed:Float) {}
function sectionHit(section:Int) {}
function beatHit(beat:Int) {}
function stepHit(step:Int) {}
Make custom substate script at substates/<mysub>/init.hxs
, you can put your substates assets in the <mysub>
folder too.
You can call your substate in a song script by using game.openCustomSubState
.
ex: game.openCustomSubState("<mysub>")
-
sub
: The current substate class. -
Paths
: Custom paths instance that only reads for files inside the<mysub>
directory. -
_Paths
: The global paths instance.
-
create()
: The function where you initialize your substate, if an error occurs, your substate will close itself.
-
sectionHit(section:Int)
: Called every section. -
beatHit(beat:Int)
: Called every beat. -
stepHit(step:Int)
: Called every step. -
update(elapsed:Float)
: Updates every frame.
Written for EE v1.1.0