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
Stage Script
skellypupper edited this page Jan 8, 2023
·
15 revisions
Stage scripts are used to create stages.
Make a stage script at assets/stages/<stagenamehere>/init.hx
, you can also put your stage assets in this directory.
Make your sprites and add them via stage.add
,
-
stage
: The current stage class (an extendedFlxTypedGroup
). Used to edit your stage. -
stage.publicSprites
: AMap
for public sprite variables. Add sprites here if you want to mess with them outside of the stage script. -
stage.foreground
: AFlxTypedGroup
that gets added after the rest of the sprites. -
stage.infrontOfGf
: AFlxTypedGroup
that gets added in front of girlfriend. (i hate limo so much) -
stage.defaultCamZoom
: A float value for how zoomed in the camera is on your stage. -
stage.cameraDisplace
: An XY pair accessible viastage.cameraDisplace.x
andstage.cameraDisplace.y
that changes where the camera starts at on your stage. -
Paths
: A custom paths instance that only reads for files inside the<stagenamehere>
directory. -
_Paths
: The global paths instance.
-
create()
: This is where you actually create all your stage variables.
-
reposCharacters()
: A function called after bf (PlayState.boyfriend
), gf (PlayState.gf
) and dad (PlayState.dad
) are created, use this function to reposition your characters. -
stepHit(step:Int)
: Called every time a step is hit from the PlayState. Good for making background characters bop. -
beatHit(beat:Int)
: Called every time a beat is hit from the PlayState. -
update(elapsed:Float)
: Called every frame.
Written for EE v1.1.0