Package | org.flixel |
Class | public class FlxGame |
Inheritance | FlxGame ![]() |
Property | Defined By | ||
---|---|---|---|
_debugger : FlxDebugger | FlxGame | ||
_debuggerUp : Boolean | FlxGame | ||
debugOnRelease : Boolean
Initialize and allow the flixel debugger overlay even in release mode. | FlxGame | ||
_flashFramerate : uint | FlxGame | ||
_maxAccumulation : uint | FlxGame | ||
_mouse : Sprite | FlxGame | ||
_recording : Boolean | FlxGame | ||
_recordingRequested : Boolean | FlxGame | ||
_replay : FlxReplay | FlxGame | ||
_replayCallback : Function | FlxGame | ||
_replayCancelKeys : Array | FlxGame | ||
_replaying : Boolean | FlxGame | ||
_replayRequested : Boolean | FlxGame | ||
_replayTimer : int | FlxGame | ||
_requestedReset : Boolean | FlxGame | ||
_requestedState : FlxState | FlxGame | ||
_state : FlxState | FlxGame | ||
_step : uint | FlxGame | ||
useSoundHotKeys : Boolean
Sets 0, -, and + to control the global volume sound volume. | FlxGame |
Property | Defined By | ||
---|---|---|---|
_accumulator : int | FlxGame | ||
_created : Boolean | FlxGame | ||
_focus : Sprite | FlxGame | ||
_iState : Class | FlxGame | ||
junk : String | FlxGame | ||
_lostFocus : Boolean | FlxGame | ||
SndBeep : Class | FlxGame | ||
_soundTray : Sprite | FlxGame | ||
_soundTrayBars : Array | FlxGame | ||
_soundTrayTimer : Number | FlxGame | ||
_total : uint | FlxGame |
Method | Defined By | ||
---|---|---|---|
FlxGame(GameSizeX:uint, GameSizeY:uint, InitialState:Class, Zoom:Number = 1)
Game object constructor - sets up the basic properties of your game. | FlxGame | ||
showSoundTray(Silent:Boolean = false):void
Makes the little volume tray slide out. | FlxGame |
Method | Defined By | ||
---|---|---|---|
create(E:Event):void
Used to instantiate the guts of flixel once we have a valid reference to the root. | FlxGame | ||
createFocusScreen():void
Sets up the darkened overlay with the big white "play" button that appears when a flixel game loses focus. | FlxGame | ||
createSoundTray():void
Sets up the "sound tray", the little volume meter that pops down sometimes. | FlxGame | ||
draw():void
Goes through the game state and draws all the game objects and special effects. | FlxGame | ||
onEnterFrame(E:Event = null):void
Handles the onEnterFrame call, figures out how many updates and draw calls to do. | FlxGame | ||
onFocus(E:Event = null):void
Internal event handler for input and focus. | FlxGame | ||
onFocusLost(E:Event = null):void
Internal event handler for input and focus. | FlxGame | ||
onKeyDown(event:KeyboardEvent):void
Internal event handler for input and focus. | FlxGame | ||
onKeyUp(event:KeyboardEvent):void
Internal event handler for input and focus. | FlxGame | ||
onMouseDown(event:MouseEvent):void
Internal event handler for input and focus. | FlxGame | ||
onMouseUp(E:MouseEvent):void
Internal event handler for input and focus. | FlxGame | ||
onMouseWheel(E:MouseEvent):void
Internal event handler for input and focus. | FlxGame | ||
step():void | FlxGame | ||
switchState():void | FlxGame | ||
update():void
This function updates the actual game state. | FlxGame | ||
updateSoundTray(MS:Number):void
This function handles updating the volume controls, debugger, stuff like that. | FlxGame |
_accumulator | property |
protected var _accumulator:int
_created | property |
protected var _created:Boolean
_debugger | property |
public var _debugger:FlxDebugger
_debuggerUp | property |
public var _debuggerUp:Boolean
_flashFramerate | property |
public var _flashFramerate:uint
_focus | property |
protected var _focus:Sprite
_iState | property |
protected var _iState:Class
_lostFocus | property |
protected var _lostFocus:Boolean
_maxAccumulation | property |
public var _maxAccumulation:uint
_mouse | property |
public var _mouse:Sprite
_recording | property |
public var _recording:Boolean
_recordingRequested | property |
public var _recordingRequested:Boolean
_replay | property |
public var _replay:FlxReplay
_replayCallback | property |
public var _replayCallback:Function
_replayCancelKeys | property |
public var _replayCancelKeys:Array
_replaying | property |
public var _replaying:Boolean
_replayRequested | property |
public var _replayRequested:Boolean
_replayTimer | property |
public var _replayTimer:int
_requestedReset | property |
public var _requestedReset:Boolean
_requestedState | property |
public var _requestedState:FlxState
_soundTray | property |
protected var _soundTray:Sprite
_soundTrayBars | property |
protected var _soundTrayBars:Array
_soundTrayTimer | property |
protected var _soundTrayTimer:Number
_state | property |
public var _state:FlxState
_step | property |
public var _step:uint
_total | property |
protected var _total:uint
debugOnRelease | property |
public var debugOnRelease:Boolean
Initialize and allow the flixel debugger overlay even in release mode.
The default value is false
.
junk | property |
protected var junk:String
SndBeep | property |
protected var SndBeep:Class
useSoundHotKeys | property |
public var useSoundHotKeys:Boolean
Sets 0, -, and + to control the global volume sound volume.
The default value is true
.
FlxGame | () | Constructor |
public function FlxGame(GameSizeX:uint, GameSizeY:uint, InitialState:Class, Zoom:Number = 1)
Game object constructor - sets up the basic properties of your game.
ParametersGameSizeX:uint — The width of your game in pixels (e.g. 320).
| |
GameSizeY:uint — The height of your game in pixels (e.g. 240).
| |
InitialState:Class — The class name of the state you want to create and switch to first (e.g. MenuState).
| |
Zoom:Number (default = 1 ) — How frequently the game should update (default is 60 times per second).
|
create | () | method |
protected function create(E:Event):void
Used to instantiate the guts of flixel once we have a valid reference to the root.
Parameters
E:Event — Just a Flash system event, not too important for our purposes.
|
createFocusScreen | () | method |
protected function createFocusScreen():void
Sets up the darkened overlay with the big white "play" button that appears when a flixel game loses focus.
createSoundTray | () | method |
protected function createSoundTray():void
Sets up the "sound tray", the little volume meter that pops down sometimes.
draw | () | method |
protected function draw():void
Goes through the game state and draws all the game objects and special effects.
onEnterFrame | () | method |
protected function onEnterFrame(E:Event = null):void
Handles the onEnterFrame call, figures out how many updates and draw calls to do.
Parameters
E:Event (default = null ) — A Flash system event, not terribly important for our purposes!
|
onFocus | () | method |
protected function onFocus(E:Event = null):void
Internal event handler for input and focus.
Parameters
E:Event (default = null )
|
onFocusLost | () | method |
protected function onFocusLost(E:Event = null):void
Internal event handler for input and focus.
Parameters
E:Event (default = null )
|
onKeyDown | () | method |
protected function onKeyDown(event:KeyboardEvent):void
Internal event handler for input and focus.
Parameters
event:KeyboardEvent |
onKeyUp | () | method |
protected function onKeyUp(event:KeyboardEvent):void
Internal event handler for input and focus.
Parameters
event:KeyboardEvent |
onMouseDown | () | method |
protected function onMouseDown(event:MouseEvent):void
Internal event handler for input and focus.
Parameters
event:MouseEvent |
onMouseUp | () | method |
protected function onMouseUp(E:MouseEvent):void
Internal event handler for input and focus.
Parameters
E:MouseEvent |
onMouseWheel | () | method |
protected function onMouseWheel(E:MouseEvent):void
Internal event handler for input and focus.
Parameters
E:MouseEvent |
showSoundTray | () | method |
public function showSoundTray(Silent:Boolean = false):void
Makes the little volume tray slide out.
Parameters
Silent:Boolean (default = false ) — Whether or not it should beep.
|
step | () | method |
protected function step():void
switchState | () | method |
protected function switchState():void
update | () | method |
protected function update():void
This function updates the actual game state. May be called multiple times per "frame" or draw call.
updateSoundTray | () | method |
protected function updateSoundTray(MS:Number):void
This function handles updating the volume controls, debugger, stuff like that. This function does NOT update the actual game state or game effects! May be called multiple times per "frame" or draw call.
Parameters
MS:Number |