프로퍼티 | 타입 | 설명 | |
---|---|---|---|
Black | uint | ||
Blue | uint | ||
DebuggerBig | uint | ||
DebuggerLeft | uint | ||
DebuggerMicro | uint | ||
DebuggerRight | uint | ||
DebuggerStandard | uint | ||
DebuggerTop | uint | ||
Green | uint | ||
LibraryMajorVersion | uint | ||
LibraryMinorVersion | uint | ||
LibraryName | string | ||
Pink | uint | ||
Red | uint | ||
White | uint | ||
camera | FlxCamera | ||
cameras | List |
||
debug | bool | ||
defaultFont | |||
elapsed | float | ||
globalSeed | float | ||
height | int | ||
keys | |||
level | int | ||
levels | |||
mouse | |||
music | FlxSound | ||
mute | bool | ||
pad1 | |||
pad2 | |||
pad3 | |||
pad4 | |||
save | int | ||
saves | |||
score | int | ||
scores | |||
sounds | |||
timeScale | float | ||
visualDebug | bool | ||
width | int | ||
zoom | float |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
_game | FlxGame | ||
paused | bool | ||
volume | float |
메소드 | 설명 | |
---|---|---|
GetRandom ( |
Fetch a random entry from the given array. Will return null if random selection is missing, or array has no entries.
|
|
addBitmap ( Microsoft.Xna.Framework.Graphics.Texture2D graphic, bool reverse = false, bool unique = false, string key = null ) : Microsoft.Xna.Framework.Graphics.Texture2D |
Loads a bitmap from a file, caches it, and generates a horizontally flipped version if necessary.
|
|
addCamera ( FlxCamera newCamera ) : FlxCamera |
Add a new camera object to the game. Handy for PiP, split-screen, etc.
|
|
addPlugin ( FlxBasic plugin ) : FlxBasic |
Adds a new plugin to the global plugin array.
|
|
checkBitmapCache ( string key ) : bool |
Check the local bitmap cache to see if a bitmap with this key has been loaded already.
|
|
clearBitmapCache ( ) : void |
Dumps the cache's image references.
|
|
collide ( FlxObject objectOrGroup1 = null, FlxObject objectOrGroup2 = null, Func |
Call this function to see if one This function just calls FlxG.overlap and presets the ProcessCallback parameter to FlxObject.separate. To create your own collision logic, write your own ProcessCallback and use FlxG.overlap to set it up. NOTE: does NOT take objects' scrollfactor into account, all overlaps are checked in world space.
|
|
createBitmap ( uint width, uint height, Color color, bool unique = false, string key = null ) : Microsoft.Xna.Framework.Graphics.Texture2D |
Generates a new
|
|
fade ( Color color, float duration = 1.0f, System.Action onComplete = null, bool force = false ) : void |
The screen is gradually filled with this color.
|
|
flash ( Color color, float duration = 1.0f, System.Action onComplete = null, bool force = false ) : void |
All screens are filled with this color and gradually return to normal.
|
|
getLibraryName ( ) : string |
For debug purpose.
|
|
loadReplay ( String data, FlxState state = null, |
Load replay data from a string and play it back.
|
|
loadReplay ( bool standardMode = true ) : void |
Resets the game or state and replay requested flag.
|
|
loadSound ( |
Creates a new sound object.
|
|
log ( Object data ) : void |
Log data to the debugger.
|
|
overlap ( FlxObject ObjectOrGroup1 = null, FlxObject ObjectOrGroup2 = null, Func |
Call this function to see if one NOTE: does NOT take objects' scrollfactor into account, all overlaps are checked in world space.
|
|
pauseSounds ( ) : void |
Pause all sounds currently playing.
|
|
play ( |
Creates a new sound object from an embedded
|
|
playMusic ( |
Set up and play a looping background soundtrack.
|
|
recordReplay ( bool standardMode = true ) : void |
Resets the game or state and requests a new recording.
|
|
removeCamera ( FlxCamera camera, bool destroy = true ) : void |
Remove a camera from the game.
|
|
removePlugin ( FlxBasic plugin ) : FlxBasic |
Removes an instance of a plugin from the global plugin array.
|
|
removePluginType ( |
Removes an instance of a plugin from the global plugin array.
|
|
resetCameras ( FlxCamera newCamera = null ) : void |
Dumps all the current cameras and resets to just one camera. Handy for doing split-screen especially.
|
|
resetDebuggerLayout ( ) : void |
Just resets the debugger windows to whatever the last selected layout was (
|
|
resetGame ( ) : void |
Like hitting the reset button on a game console, this will re-launch the game as if it just started.
|
|
resetInput ( ) : void |
Reset the input helper objects (useful when changing screens or states).
|
|
resetState ( ) : void |
Request a reset of the current game state.
|
|
resumeSounds ( ) : void |
Resume playing existing sounds.
|
|
setDebuggerLayout ( uint layout ) : void |
Change the way the debugger's windows are laid out.
|
|
shuffle ( |
Shuffles the entries in an array into a new random order.
|
|
stopRecording ( ) : string |
Stop recording the current replay and return the replay data.
|
|
stream ( string url, float Volume = 1.0f, bool looped = false, bool autoDestroy = true ) : FlxSound |
Creates a new sound object from a URL. NOTE: Just calls FlxG.loadSound() with AutoPlay == true.
|
|
switchState ( FlxState state ) : void |
Switch from the current game state to the one specified here.
|
|
unwatch ( object anyObject, string variableName ) : void |
Remove a variable from the watch list in the debugger. Don't pass a Variable Name to remove all watched variables for the specified object.
|
|
watch ( object anyObject, string variableName, string displayName = null ) : void |
Add a variable to the watch list in the debugger. This lets you see the value of the variable all the time.
|
메소드 | 설명 | |
---|---|---|
destroySounds ( bool forceDestroy = false ) : void |
Called by FlxGame on state changes to stop and destroy sounds.
|
|
drawPlugins ( ) : void |
Used by the game object to call
|
|
init ( FlxGame game, int width, int height, float zoom ) : void |
Called by
|
|
lockCameras ( ) : void |
Called by the game object to lock all the camera buffers and clear them for the next draw pass.
|
|
random ( ) : float |
Generates a random number. Deterministic, meaning safe to use if you want to record replays in random environments.
|
|
reset ( ) : void |
Called whenever the game is reset, doesn't have to do quite as much work as the basic initialization stuff.
|
|
shake ( float intensity = 0.05f, float duration = 0.5f, System.Action onComplete = null, bool force = true, uint direction ) : void |
A simple screen-shake effect.
|
|
snap ( float XorY, float Grid ) : float | ||
unlockCameras ( ) : void |
Called by the game object to draw the special FX and unlock all the camera buffers.
|
|
update ( |
Internal function for updating Camera, State, Console, and Elapsed Time
|
|
updateCameras ( ) : void |
Called by the game object to update the cameras and their tracking/special effects logic.
|
|
updateInput ( ) : void |
Called by the game object to update the keyboard and mouse input tracking objects.
|
|
updatePlugins ( ) : void |
Used by the game object to call
|
|
updateSounds ( ) : void |
Called by the game loop to make sure the sounds get updated each frame.
|
public static GetRandom ( |
||
objects | A Flash array of objects. | |
startIndex | int | Optional offset off the front of the array. Default value is 0, or the beginning of the array. |
length | int | Optional restriction on the number of values you want to randomly select from. |
리턴 | object |
public static addBitmap ( Microsoft.Xna.Framework.Graphics.Texture2D graphic, bool reverse = false, bool unique = false, string key = null ) : Microsoft.Xna.Framework.Graphics.Texture2D | ||
graphic | Microsoft.Xna.Framework.Graphics.Texture2D | The image file that you want to load. |
reverse | bool | Whether to generate a flipped version. |
unique | bool | Ensures that the bitmap data uses a new slot in the cache. |
key | string | Force the cache to use a specific Key to index the bitmap. |
리턴 | Microsoft.Xna.Framework.Graphics.Texture2D |
public static addCamera ( FlxCamera newCamera ) : FlxCamera | ||
newCamera | FlxCamera | The camera you want to add. |
리턴 | FlxCamera |
public static addPlugin ( FlxBasic plugin ) : FlxBasic | ||
plugin | FlxBasic | Any object that extends FlxBasic. Useful for managers and other things. See org.flixel.plugin for some examples! |
리턴 | FlxBasic |
public static checkBitmapCache ( string key ) : bool | ||
key | string | The string key identifying the bitmap. |
리턴 | bool |
public static collide ( FlxObject objectOrGroup1 = null, FlxObject objectOrGroup2 = null, Func |
||
objectOrGroup1 | FlxObject | The first object or group you want to check. |
objectOrGroup2 | FlxObject | The second object or group you want to check. If it is the same as the first, flixel knows to just do a comparison within that group. |
notifyCallback | Func |
A function with two FlxObject parameters - e.g. myOverlapFunction(Object1:FlxObject,Object2:FlxObject) - that is called if those two objects overlap. |
리턴 | System.Boolean |
public static createBitmap ( uint width, uint height, Color color, bool unique = false, string key = null ) : Microsoft.Xna.Framework.Graphics.Texture2D | ||
width | uint | How wide the square should be. |
height | uint | How high the square should be. |
color | Color | What color the square should be (0xAARRGGBB) |
unique | bool | Ensures that the bitmap data uses a new slot in the cache. |
key | string | Force the cache to use a specific Key to index the bitmap. |
리턴 | Microsoft.Xna.Framework.Graphics.Texture2D |
public static fade ( Color color, float duration = 1.0f, System.Action onComplete = null, bool force = false ) : void | ||
color | Color | The color you want to use. |
duration | float | How long it takes for the fade to fade. |
onComplete | System.Action | A function you want to run when the flash finishes. |
force | bool | Force the effect to reset. |
리턴 | void |
public static flash ( Color color, float duration = 1.0f, System.Action onComplete = null, bool force = false ) : void | ||
color | Color | The color you want to use. |
duration | float | How long it takes for the flash to fade. |
onComplete | System.Action | A function you want to run when the flash finishes. |
force | bool | Force the effect to reset. |
리턴 | void |
public static loadReplay ( String data, FlxState state = null, |
||
data | String | The replay that you want to load. |
state | FlxState | Optional parameter: if you recorded a state-specific demo or cutscene, pass a new instance of that state here. |
cancelKeys | Optional parameter: an array of string names of keys (see FlxKeyboard) that can be pressed to cancel the playback, e.g. ["ESCAPE","ENTER"]. Also accepts 2 custom key names: "ANY" and "MOUSE" (fairly self-explanatory I hope!). | |
timeout | float | Optional parameter: set a time limit for the replay. CancelKeys will override this if pressed. |
callback | System.Action | Optional parameter: if set, called when the replay finishes. Running to the end, CancelKeys, and Timeout will all trigger Callback(), but only once, and CancelKeys and Timeout will NOT call FlxG.stopReplay() if Callback is set! |
리턴 | void |
public static loadReplay ( bool standardMode = true ) : void | ||
standardMode | bool | If true, reload entire game, else just reload current game state. |
리턴 | void |
public static loadSound ( |
||
soundEffect | The embedded sound resource you want to play. To stream, use the optional URL parameter instead. | |
volume | float | How loud to play it (0 to 1). |
looped | bool | Whether to loop this sound. |
autoDestroy | bool | Whether to destroy this sound when it finishes playing. Leave this value set to "false" if you want to re-use this FlxSound instance. |
autoPlay | bool | Whether to play the sound. |
url | string | Load a sound from an external web resource instead. Only used if EmbeddedSound = null. |
리턴 | FlxSound |
public static log ( Object data ) : void | ||
data | Object | Anything you want to log to the console. |
리턴 | void |
public static overlap ( FlxObject ObjectOrGroup1 = null, FlxObject ObjectOrGroup2 = null, Func |
||
ObjectOrGroup1 | FlxObject | The first object or group you want to check. |
ObjectOrGroup2 | FlxObject | The second object or group you want to check. If it is the same as the first, flixel knows to just do a comparison within that group. |
NotifyCallback | Func |
A function with two FlxObject parameters - e.g. myOverlapFunction(Object1:FlxObject,Object2:FlxObject) - that is called if those two objects overlap. |
ProcessCallback | Func |
A function with two FlxObject parameters - e.g. myOverlapFunction(Object1:FlxObject,Object2:FlxObject) - that is called if those two objects overlap. If a ProcessCallback is provided, then NotifyCallback will only be called if ProcessCallback returns true for those objects! |
리턴 | System.Boolean |
public static play ( |
||
soundEffect | The sound you want to play. | |
volume | float | How loud to play it (0 to 1). |
looped | bool | Whether to loop this sound. |
autoDestroy | bool | Whether to destroy this sound when it finishes playing. Leave this value set to "false" if you want to re-use this FlxSound instance. |
리턴 | FlxSound |
public static playMusic ( |
||
soundEffect | The sound file you want to loop in the background. | |
volume | float | How loud the sound should be, from 0 to 1. |
리턴 | void |
public static recordReplay ( bool standardMode = true ) : void | ||
standardMode | bool | If true, reset the entire game, else just reset the current state. |
리턴 | void |
public static removeCamera ( FlxCamera camera, bool destroy = true ) : void | ||
camera | FlxCamera | The camera you want to remove. |
destroy | bool | Whether to call destroy() on the camera, default value is true. |
리턴 | void |
public static removePlugin ( FlxBasic plugin ) : FlxBasic | ||
plugin | FlxBasic | The plugin instance you want to remove. |
리턴 | FlxBasic |
public static removePluginType ( |
||
type | The class name of the plugin type you want removed from the array. | |
리턴 | bool |
public static resetCameras ( FlxCamera newCamera = null ) : void | ||
newCamera | FlxCamera | Optional; specify a specific camera object to be the new main camera. |
리턴 | void |
public static setDebuggerLayout ( uint layout ) : void | ||
layout | uint | See the presets above (e.g. DEBUGGER_MICRO , etc). |
리턴 | void |
public static shuffle ( |
||
objects | A Flash Array object containing...stuff. |
|
howManyTimes | uint | How many swaps to perform during the shuffle operation. Good rule of thumb is 2-4 times as many objects are in the list. |
리턴 |
public static stream ( string url, float Volume = 1.0f, bool looped = false, bool autoDestroy = true ) : FlxSound | ||
url | string | The URL of the sound you want to play. |
Volume | float | How loud to play it (0 to 1). |
looped | bool | Whether or not to loop this sound. |
autoDestroy | bool | Whether to destroy this sound when it finishes playing. Leave this value set to "false" if you want to re-use this FlxSound instance. |
리턴 | FlxSound |
public static switchState ( FlxState state ) : void | ||
state | FlxState | The new state. |
리턴 | void |
public static unwatch ( object anyObject, string variableName ) : void | ||
anyObject | object | A reference to any object in your game, e.g. Player or Robot or this. |
variableName | string | The name of the variable you want to watch, in quotes, as a string: e.g. "speed" or "health". |
리턴 | void |
public static watch ( object anyObject, string variableName, string displayName = null ) : void | ||
anyObject | object | A reference to any object in your game, e.g. Player or Robot or this. |
variableName | string | The name of the variable you want to watch, in quotes, as a string: e.g. "speed" or "health". |
displayName | string | Optional, display your own string instead of the class name + variable name: e.g. "enemy count". |
리턴 | void |
public static SpriteFont,Microsoft.Xna.Framework.Graphics defaultFont | ||
리턴 |
public static FlxMouse,flxSharp.flxSharp.System mouse | ||
리턴 |