2016-10-03 20:43:09 -04:00
|
|
|
package;
|
|
|
|
|
2016-10-07 07:19:05 -04:00
|
|
|
import flixel.FlxG;
|
2016-10-03 20:43:09 -04:00
|
|
|
import flixel.FlxGame;
|
2016-10-07 07:19:05 -04:00
|
|
|
import flixel.util.FlxSave;
|
2016-10-03 20:43:09 -04:00
|
|
|
import openfl.display.Sprite;
|
|
|
|
|
|
|
|
class Main extends Sprite
|
|
|
|
{
|
2016-10-09 05:33:29 -04:00
|
|
|
// 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()
|
|
|
|
{
|
2016-10-07 07:19:05 -04:00
|
|
|
// 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));
|
2016-10-07 07:19:05 -04:00
|
|
|
|
|
|
|
// 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();
|
2016-10-07 07:19:05 -04:00
|
|
|
|
|
|
|
// SAVE END
|
|
|
|
_save.close();
|
2016-10-03 20:43:09 -04:00
|
|
|
}
|
|
|
|
}
|