mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-01-19 02:58:14 +00:00
Add state and substate to watch
This commit is contained in:
commit
a0df87c6b2
|
@ -22,6 +22,17 @@ class WatchPlugin extends FlxBasic
|
||||||
{
|
{
|
||||||
super.update(elapsed);
|
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("songPosition", Conductor.instance.songPosition);
|
||||||
FlxG.watch.addQuick("songPositionNoOffset", Conductor.instance.songPosition + Conductor.instance.instrumentalOffset);
|
FlxG.watch.addQuick("songPositionNoOffset", Conductor.instance.songPosition + Conductor.instance.instrumentalOffset);
|
||||||
FlxG.watch.addQuick("musicTime", FlxG.sound?.music?.time ?? 0.0);
|
FlxG.watch.addQuick("musicTime", FlxG.sound?.music?.time ?? 0.0);
|
||||||
|
|
Loading…
Reference in a new issue