Свойство | Type | Description | |
---|---|---|---|
Focus | Microsoft.Xna.Framework.Graphics.Texture2D | ||
InitialState | FlxState | ||
SoundTray | Microsoft.Xna.Framework.Graphics.Texture2D | ||
SoundTrayBars | |||
SoundTrayTimer | float |
Свойство | Type | Description | |
---|---|---|---|
createFocusScreen | void | ||
createSoundTray | void | ||
showSoundTray | void |
Méthode | Description | |
---|---|---|
FlxGame ( FlxState State, int Width = 1280, int Height = 720, float Zoom = 1.0f, string ContentRootDirectory = "Content" ) : System |
FlxGame constructor takes in the initial state and resolution of the screen.
|
|
FlxGame ( int gameSizeX, int gameSizeY, FlxState initialState, float zoom = 1.0f, int gameFramerate = 60, int flashFramerate, bool useSystemCursor = false ) : System |
Instantiate a new game object.
|
Méthode | Description | |
---|---|---|
Step ( ) : void |
This is the main game update logic section. The onEnterFrame() handler is in charge of calling this the appropriate number of times each frame. This block handles state changes, replays, all that good stuff.
|
|
create ( |
Used to instantiate the guts of the flixel game object once we have a valid reference to the root.
|
|
draw ( ) : void |
Goes through the game state and draws all the game objects and special effects.
|
|
onEnterFrame ( |
Handles the onEnterFrame call and figures out how many updates and draw calls to do.
|
|
onFocus ( |
Internal event handler for input and focus.
|
|
onFocusLost ( |
Internal event handler for input and focus.
|
|
onKeyDown ( |
Internal event handler for input and focus.
|
|
onKeyUp ( |
Internal event handler for input and focus.
|
|
onMouseDown ( |
Internal event handler for input and focus.
|
|
onMouseUp ( |
Internal event handler for input and focus.
|
|
onMouseWheel ( |
Internal event handler for input and focus.
|
|
switchState ( ) : void |
If there is a state change requested during the update loop, this function handles actual destroying the old state and related processes, and calls creates on the new state and plugs it into the game object.
|
|
update ( ) : void |
This function is called by step() and updates the actual game state. May be called multiple times per "frame" or draw call.
|
|
updateSoundTray ( float ms ) : void |
This function just updates the soundtray object.
|
Méthode | Description | |
---|---|---|
createFocusScreen ( ) : void |
Sets up the darkened overlay with the big white "play" button that appears when a flixel game loses focus.
|
|
createSoundTray ( ) : void |
Sets up the "sound tray", the little volume meter that pops down sometimes.
|
|
showSoundTray ( bool silent = false ) : void |
Makes the little volume tray slide out.
|
public FlxGame ( FlxState State, int Width = 1280, int Height = 720, float Zoom = 1.0f, string ContentRootDirectory = "Content" ) : System | ||
State | FlxState | The state you want to load |
Width | int | The width of the screen |
Height | int | The height of the screen |
Zoom | float | |
ContentRootDirectory | string | The directory of your content. It is set automatically by default but you can change it if you want to. |
Résultat | System |
public FlxGame ( int gameSizeX, int gameSizeY, FlxState initialState, float zoom = 1.0f, int gameFramerate = 60, int flashFramerate, bool useSystemCursor = false ) : System | ||
gameSizeX | int | The width of your game in game pixels, not necessarily final display pixels (see Zoom). |
gameSizeY | int | The height of your game in game pixels, not necessarily final display pixels (see Zoom). |
initialState | FlxState | The class name of the state you want to create and switch to first (e.g. MenuState). |
zoom | float | The default level of zoom for the game's cameras (e.g. 2 = all pixels are now drawn at 2x). Default = 1. |
gameFramerate | int | How frequently the game should update (default is 60 times per second). |
flashFramerate | int | Sets the actual display framerate for Flash player (default is 30 times per second). |
useSystemCursor | bool | Whether to use the default OS mouse pointer, or to use custom flixel ones. |
Résultat | System |
protected create ( |
||
flashEvent | Just a Flash system event, not too important for our purposes. | |
Résultat | void |
protected onEnterFrame ( |
||
eventArgs | Flash event. | |
Résultat | void |
protected onFocus ( |
||
eventArgs | Flash event. | |
Résultat | void |
protected onFocusLost ( |
||
eventArgs | Flash event. | |
Résultat | void |
protected onKeyDown ( |
||
keyboardEvent | Flash keyboard event. | |
Résultat | void |
protected onKeyUp ( |
||
keyboardEvent | Flash keyboard event. | |
Résultat | void |
protected onMouseDown ( |
||
mouseEvent | Flash mouse event. | |
Résultat | void |
protected onMouseUp ( |
||
mouseEvent | Flash mouse event. | |
Résultat | void |
protected onMouseWheel ( |
||
mouseEvent | Flash mouse event. | |
Résultat | void |
protected updateSoundTray ( float ms ) : void | ||
ms | float | |
Résultat | void |
protected Texture2D,Microsoft.Xna.Framework.Graphics Focus | ||
Résultat | Microsoft.Xna.Framework.Graphics.Texture2D |
protected Texture2D,Microsoft.Xna.Framework.Graphics SoundTray | ||
Résultat | Microsoft.Xna.Framework.Graphics.Texture2D |