package;

import flash.geom.Rectangle;
import flash.Lib;
import flixel.FlxGame;
import flixel.FlxState;
import flash.system.Capabilities;

class GameClass extends FlxGame
{	
	var initialState:Class<FlxState> = MainMenuState; // The FlxState the game starts with.
	var zoom:Float = -1; // If -1, zoom is automatically calculated to fit the window dimensions.
	var framerate:Int = 60; // How many frames per second the game should run at.
	var skipSplash:Bool = true; // Whether to skip the flixel splash screen that appears in release mode.
	var startFullscreen:Bool = true; // Whether to start the game in fullscreen on desktop targets
	var deviceSize:Rectangle;
	var deviceSize_fullscreen:Rectangle;
	
	public function new()
	{
		
		deviceSize = new Rectangle(0, 0,
			Lib.current.stage.stageWidth,
			Lib.current.stage.stageHeight
		);

		deviceSize_fullscreen = new Rectangle(0, 0,
			Capabilities.screenResolutionX,
			Capabilities.screenResolutionY
		);

		var gameWidth:Int = Math.round(deviceSize_fullscreen.width);
		var gameHeight:Int = Math.round(deviceSize_fullscreen.height);			
		
		super(gameWidth, gameHeight, initialState, zoom, framerate, framerate, skipSplash, startFullscreen);
	}

}
