aboutsummaryrefslogtreecommitdiff
path: root/source/screens/RegisterPlayerState.hx
blob: e50d3d1022b173c1aee528e8ddc0763db7ea80a6 (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
package screens;

import flixel.FlxG;
import flixel.FlxSprite;
import flixel.FlxState;
import shared.PlayerSave;
import shared.UserNamePopup;

class RegisterPlayerState extends FlxState
{
	override public function create()
	{
		super.create();
		var bg = new FlxSprite(0, 0, AssetPaths.space_bg__png);
		var popup = new UserNamePopup(OnSave);
		add(bg);
		add(popup);
	}

	function OnSave(data:PlayerSave)
	{
		if (data != null)
		{
			FlxG.switchState(new MenuState());
		}
	}
}