Свойство | Тип | Описание | |
---|---|---|---|
Acceleration | |||
Drag | |||
MaxVelocity | |||
ScrollFactor | |||
Velocity |
Свойство | Тип | Описание | |
---|---|---|---|
PZero | |||
_flicker | bool | ||
_flickerTimer | float | ||
_pathInc | int | ||
_pathMode | uint | ||
_pathNodeIndex | int | ||
_pathRotate | bool | ||
_tagPoint | |||
_tagRect | FlxRect |
Метод | Описание | |
---|---|---|
FlxObject ( float x, float y, float width, float height ) : System |
Instantiates a
|
|
destroy ( ) : void |
Override this function to null out variables or manually call destroy() on class members if necessary. Don't forget to call super.destroy()!
|
|
draw ( ) : void |
Rarely called, and in this case just increments the visible objects count and calls
|
|
drawDebug ( FlxCamera Camera = null ) : void |
#flx - Not yet implemented / missing FlxG.flashGfx for direct drawing (draw on immovable debug overlay?)
|
|
flicker ( float duration = 1.0f ) : void |
Tells this object to flicker, retro-style. Pass a negative value to flicker forever.
|
|
followPath ( |
Call this function to give this object a path to follow. If the path does not have at least one node in it, this function will log a warning message and return.
|
|
getMidpoint ( |
Retrieve the midpoint of this object in world coordinates.
|
|
getScreenXY ( |
Call this function to figure out the on-screen position of the object.
|
|
hurt ( float damage ) : void |
Reduces the "health" variable of this sprite by the amount specified in Damage. Calls kill() if health drops to or below zero.
|
|
isTouching ( uint direction ) : bool |
Handy function for checking if this object is touching a particular surface. For slightly better performance you can just & the value directly into
|
|
justTouched ( uint direction ) : bool |
Handy function for checking if this object is just landed on a particular surface.
|
|
onScreen ( FlxCamera camera = null ) : bool |
Check and see if this object is currently on screen.
|
|
overlaps ( FlxBasic objectOrGroup, bool inScreenSpace = false, FlxCamera camera = null ) : bool |
Checks to see if some
|
|
overlapsAt ( float x, float y, FlxBasic objectOrGroup, bool inScreenSpace = false, FlxCamera camera = null ) : bool |
Checks to see if this
|
|
overlapsPoint ( |
Checks to see if a point in 2D world space overlaps this
|
|
postUpdate ( ) : void |
Post-update is called right after
|
|
preUpdate ( ) : void |
Pre-update is called right before
|
|
reset ( float x, float y ) : void |
Handy function for reviving game objects. Resets their existence flags and position.
|
|
separate ( FlxObject objectOne, FlxObject objectTwo ) : bool |
The main collision resolution function in flixel.
|
|
separateX ( FlxObject objectOne, FlxObject objectTwo ) : bool |
The X-axis component of the object separation process.
|
|
separateY ( FlxObject objectOne, FlxObject objectTwo ) : bool |
The Y-axis component of the object separation process.
|
|
stopFollowingPath ( bool destroyPath = false ) : void |
Tells this object to stop following the path its on.
|
|
update ( ) : void |
flx# - ? method not present in flixel
|
Метод | Описание | |
---|---|---|
advancePath ( bool snap = true ) : |
Internal function that decides what node in the path to aim for next based on the behavior flags.
|
|
updateMotion ( ) : void |
Internal function for updating the position and speed of this object. Useful for cases when you need to update this but are buried down in too many supers. Does a slightly fancier-than-normal integration to help with higher fidelity framerate-independenct motion.
|
|
updatePathMotion ( ) : void |
Internal function for moving the object along the path. Generally this function is called automatically by
|
public FlxObject ( float x, float y, float width, float height ) : System | ||
x | float | X-coordinate of the object in space. |
y | float | y-coordinate of the object in space. |
width | float | Desired width of the rectangle. |
height | float | Desired height of the rectangle. |
Результат | System |
protected advancePath ( bool snap = true ) : |
||
snap | bool | ? |
Результат |
public drawDebug ( FlxCamera Camera = null ) : void | ||
Camera | FlxCamera | Which Camera - currently only one exists |
Результат | void |
public flicker ( float duration = 1.0f ) : void | ||
duration | float | How many seconds to flicker for. |
Результат | void |
public followPath ( |
||
path | The FlxPath you want this object to follow. |
|
speed | float | How fast to travel along the path in pixels per second. |
mode | uint | Optional, controls the behavior of the object following the path using the path behavior constants. Can use multiple flags at once, for example PATH_YOYO|PATH_HORIZONTAL_ONLY will make an object move back and forth along the X axis of the path only. |
autoRotate | bool | Automatically point the object toward the next node. Assumes the graphic is pointing upward. Default behavior is false, or no automatic rotation. |
Результат | void |
public getMidpoint ( |
||
point | Allows you to pass in an existing FlxPoint object if you're so inclined. Otherwise a new one is created. |
|
Результат |
public getScreenXY ( |
||
point | Takes a FlxPoint object and assigns the post-scrolled X and Y values of this object to it. |
|
camera | FlxCamera | Specify which game camera you want. If null getScreenXY() will just grab the first global camera. |
Результат |
public hurt ( float damage ) : void | ||
damage | float | How much health to take away (use a negative number to give a health bonus). |
Результат | void |
public isTouching ( uint direction ) : bool | ||
direction | uint | Any of the collision flags (e.g. LEFT, FLOOR, etc). |
Результат | bool |
public justTouched ( uint direction ) : bool | ||
direction | uint | Any of the collision flags (e.g. LEFT, FLOOR, etc). |
Результат | bool |
public onScreen ( FlxCamera camera = null ) : bool | ||
camera | FlxCamera | Specify which game camera you want. If null getScreenXY() will just grab the first global camera. |
Результат | bool |
public overlaps ( FlxBasic objectOrGroup, bool inScreenSpace = false, FlxCamera camera = null ) : bool | ||
objectOrGroup | FlxBasic | The object or group being tested. |
inScreenSpace | bool | Whether to take scroll factors into account when checking for overlap. Default is false, or "only compare in world space." |
camera | FlxCamera | Specify which game camera you want. If null getScreenXY() will just grab the first global camera. flx# - currently only one exists |
Результат | bool |
public overlapsAt ( float x, float y, FlxBasic objectOrGroup, bool inScreenSpace = false, FlxCamera camera = null ) : bool | ||
x | float | The X position you want to check. Pretends this object (the caller, not the parameter) is located here. |
y | float | The Y position you want to check. Pretends this object (the caller, not the parameter) is located here. |
objectOrGroup | FlxBasic | The object or group being tested. |
inScreenSpace | bool | Whether to take scroll factors into account when checking for overlap. Default is false, or "only compare in world space." |
camera | FlxCamera | Specify which game camera you want. If null getScreenXY() will just grab the first global camera. flx# - currently only one exists |
Результат | bool |
public overlapsPoint ( |
||
point | The point in world space you want to check. | |
inScreenSpace | bool | Whether to take scroll factors into account when checking for overlap. |
camera | FlxCamera | Specify which game camera you want. If null getScreenXY() will just grab the first global camera. flx# - currently only one exists |
Результат | bool |
public reset ( float x, float y ) : void | ||
x | float | The new X position of this object. |
y | float | The new Y position of this object. |
Результат | void |
public static separate ( FlxObject objectOne, FlxObject objectTwo ) : bool | ||
objectOne | FlxObject | Any FlxObject . |
objectTwo | FlxObject | Any other FlxObject . |
Результат | bool |
public static separateX ( FlxObject objectOne, FlxObject objectTwo ) : bool | ||
objectOne | FlxObject | Any FlxObject . |
objectTwo | FlxObject | Any other FlxObject . |
Результат | bool |
public static separateY ( FlxObject objectOne, FlxObject objectTwo ) : bool | ||
objectOne | FlxObject | Any FlxObject . |
objectTwo | FlxObject | Any other FlxObject . |
Результат | bool |
public stopFollowingPath ( bool destroyPath = false ) : void | ||
destroyPath | bool | Tells this function whether to call destroy on the path object. Default value is false. |
Результат | void |
protected static FlxPoint,flxSharp.flxSharp PZero | ||
Результат |