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
|
|
|
|
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();
|
2016-10-07 00:16:45 -04:00
|
|
|
|
|
|
|
// DEBUG
|
|
|
|
FlxG.debugger.setLayout(FlxDebuggerLayout.RIGHT);
|
2016-10-03 20:43:09 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
override public function update(elapsed:Float):Void
|
|
|
|
{
|
|
|
|
super.update(elapsed);
|
|
|
|
}
|
|
|
|
}
|