aboutsummaryrefslogtreecommitdiff
path: root/source/screens/MenuState.hx
blob: 9f4deda0e12b97e07fe65539a7e3b9bafac78533 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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());
	}
}