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

31 lines
524 B
Haxe

package;
import flixel.FlxG;
import flixel.FlxGame;
import flixel.util.FlxSave;
import openfl.display.Sprite;
class Main extends Sprite
{
public function new()
{
// SAVE BEGIN
var _save = new FlxSave();
_save.bind("Pet.GB");
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
_save.data.volume = FlxG.sound.volume;
// SAVE END
_save.close();
}
}