diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 6346c88..ee1ac92 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -90,13 +90,29 @@ class ChartingState extends MusicBeatState override function create() { + if (PlayState.SONG != null) + _song = PlayState.SONG; + else + { + _song = { + song: 'Test', + notes: [], + bpm: 150, + needsVoices: true, + player1: 'bf', + player2: 'dad', + speed: 1, + validScore: false + }; + } + curSection = lastSection; gridBG = FlxGridOverlay.create(GRID_SIZE, GRID_SIZE, GRID_SIZE * 8, GRID_SIZE * 16); add(gridBG); - leftIcon = new HealthIcon('bf'); - rightIcon = new HealthIcon('dad'); + leftIcon = new HealthIcon(PlayState.SONG.player1); + rightIcon = new HealthIcon(PlayState.SONG.player2); leftIcon.scrollFactor.set(1, 1); rightIcon.scrollFactor.set(1, 1); @@ -115,22 +131,6 @@ class ChartingState extends MusicBeatState curRenderedNotes = new FlxTypedGroup(); curRenderedSustains = new FlxTypedGroup(); - if (PlayState.SONG != null) - _song = PlayState.SONG; - else - { - _song = { - song: 'Test', - notes: [], - bpm: 150, - needsVoices: true, - player1: 'bf', - player2: 'dad', - speed: 1, - validScore: false - }; - } - FlxG.mouse.visible = true; FlxG.save.bind('funkin', 'ninjamuffin99');