1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-12 16:35:51 +00:00

Add state and substate to watch

This commit is contained in:
EliteMasterEric 2024-02-12 16:49:04 -05:00
commit a0df87c6b2

View file

@ -22,6 +22,17 @@ class WatchPlugin extends FlxBasic
{
super.update(elapsed);
var stateClassName = Type.getClassName(Type.getClass(FlxG.state));
FlxG.watch.addQuick("currentState", stateClassName);
var subStateClassNames = [];
var subState = FlxG.state.subState;
while (subState != null)
{
subStateClassNames.push(Type.getClassName(Type.getClass(subState)));
subState = subState.subState;
}
FlxG.watch.addQuick("currentSubStates", subStateClassNames.join(", "));
FlxG.watch.addQuick("songPosition", Conductor.instance.songPosition);
FlxG.watch.addQuick("songPositionNoOffset", Conductor.instance.songPosition + Conductor.instance.instrumentalOffset);
FlxG.watch.addQuick("musicTime", FlxG.sound?.music?.time ?? 0.0);