diff options
author | Indrajith K L | 2021-09-22 10:10:50 +0530 |
---|---|---|
committer | Indrajith K L | 2021-09-22 10:10:50 +0530 |
commit | 9abd235ed2b9a5c80d5e63d6187d69e9317c2f0d (patch) | |
tree | 5a7618d359c216a9a24ff73e2bdc3550e9d03080 /source/screens/MenuState.hx | |
download | LeaderboardTest-9abd235ed2b9a5c80d5e63d6187d69e9317c2f0d.tar.gz LeaderboardTest-9abd235ed2b9a5c80d5e63d6187d69e9317c2f0d.tar.bz2 LeaderboardTest-9abd235ed2b9a5c80d5e63d6187d69e9317c2f0d.zip |
* Initial Commit
* Leaderboard Implementation for dreamlo
* FlxSave for Player Data
* GUID Generation for Unique User
Diffstat (limited to 'source/screens/MenuState.hx')
-rw-r--r-- | source/screens/MenuState.hx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/source/screens/MenuState.hx b/source/screens/MenuState.hx new file mode 100644 index 0000000..9f4deda --- /dev/null +++ b/source/screens/MenuState.hx @@ -0,0 +1,31 @@ +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()); + } +} |