package screens; import flixel.FlxG; import flixel.FlxState; import flixel.ui.FlxButton; import shared.PlayerSave; class MenuState extends FlxState { public function new() { super(); var playButton = new FlxButton(FlxG.width / 2 - 40, FlxG.height / 2, "Play", onPlayButtonPressed); var leaderBoardButton = new FlxButton(FlxG.width / 2 - 40, FlxG.width / 2 + 30, "Leaderboard", onLeaderBoardButtonPressed); add(playButton); add(leaderBoardButton); trace(PlayerSave.instance.guid); } override public function create() { super.create(); } function onPlayButtonPressed() {} function onLeaderBoardButtonPressed() { FlxG.switchState(new LeaderBoardState()); } }