class flixel.FlxGame extends Sprite

Available on all platforms

FlxGame is the heart of all flixel games, and contains a bunch of basic game loops and things. * It is a long and sloppy file that you shouldn't have to worry about too much! * It is basically only used to create your game object in the first place, * after that FlxG and FlxState have all the useful stuff you actually need.

Instance Fields

var debugger:FlxDebugger

The debugger overlay object.

var focusLostFramerate:Int

Framerate to use on focus lost. Default = 10.

var soundTray:FlxSoundTray

The sound tray display container (see createSoundTray()).

var ticks:Int

Time in milliseconds that has passed (amount of "ticks" passed) since the game has started.

function new(?GameSizeX:Int = 640, ?GameSizeY:Int = 480, ?InitialState:Class<FlxState> = null, ?Zoom:Float = 1, ?UpdateFramerate:Int = 60, ?DrawFramerate:Int = 60, ?SkipSplash:Bool = false, ?StartFullscreen:Bool = false):Void

Instantiate a new game object. * *

GameSizeX

The width of your game in game pixels, not necessarily final display pixels (see Zoom). *

GameSizeY

The height of your game in game pixels, not necessarily final display pixels (see Zoom). *

InitialState

The class name of the state you want to create and switch to first (e.g. MenuState). *

Zoom

The default level of zoom for the game's cameras (e.g. 2 = all pixels are now drawn at 2x). Default = 1. *

UpdateFramerate

How frequently the game should update (default is 60 times per second). *

DrawFramerate

Sets the actual display / draw framerate for the game (default is 60 times per second). *

SkipSplash

Whether you want to skip the flixel splash screen in FLXNODEBUG or not. *

StartFullscreen

Whether to start the game in fullscreen mode (desktop targets only), false by default