1
0
mirror of https://github.com/Melon-Bread/Pet.GB synced 2024-11-28 13:58:20 -05:00
Pet.GB/source/PlayState.hx

40 lines
738 B
Haxe
Raw Normal View History

2016-10-03 20:43:09 -04:00
package;
import flixel.FlxG;
import flixel.FlxSprite;
import flixel.FlxState;
2016-10-06 01:18:02 -04:00
import flixel.system.debug.FlxDebugger;
2016-10-03 20:43:09 -04:00
class PlayState extends FlxState
{
private var _sprBackground:FlxSprite;
private var _gelPet:Gel;
private var _hud:HUD;
2016-10-06 01:18:02 -04:00
// DEBUG
FlxG.debugger.setLayout(FlxDebuggerLayout.RIGHT);
2016-10-03 20:43:09 -04:00
override public function create():Void
{
_sprBackground = new FlxSprite(0, 0, AssetPaths.background__png);
add(_sprBackground);
_gelPet = new Gel();
_gelPet.x = ((FlxG.width/2) - (_gelPet.width/2));
_gelPet.y = ((FlxG.height/2) - (_gelPet.height/2));
add(_gelPet);
_hud = new HUD(_gelPet);
add(_hud);
super.create();
}
override public function update(elapsed:Float):Void
{
super.update(elapsed);
}
}