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

37 lines
686 B
Haxe
Raw Normal View History

2016-10-03 20:43:09 -04:00
package;
import flixel.FlxG;
2016-10-03 20:43:09 -04:00
import flixel.FlxGame;
import flixel.util.FlxSave;
2016-10-03 20:43:09 -04:00
import openfl.display.Sprite;
class Main extends Sprite
{
// TODO: Fix Gel Colors
// TODO: Add END_GAME Flags
// TODO: Makes saving work for at least the config screen
// TODO: Make Game Over screen
2016-10-03 20:43:09 -04:00
public function new()
{
// SAVE BEGIN
var _save = new FlxSave();
_save.bind("Pet.GB");
2016-10-03 20:43:09 -04:00
super();
addChild(new FlxGame(0, 0, MenuState));
// Loads volume if exists
if (_save.data.volume != null)
FlxG.sound.volume = _save.data.volume;
// Set save data volume to default (100%)
else
2016-10-08 01:07:30 -04:00
_save.data.volume = 1;
// SAVE WRITE
_save.flush();
// SAVE END
_save.close();
2016-10-03 20:43:09 -04:00
}
}