Package | org.flixel.data |
Class | public class FlxFade |
Inheritance | FlxFade FlxSprite FlxObject FlxRect FlxPoint |
Property | Defined by | ||
---|---|---|---|
_alpha : Number | FlxSprite | ||
_animations : Array | FlxSprite | ||
_bakedRotation : Number | FlxSprite | ||
_bbb : BitmapData | FlxSprite | ||
_boundsVisible : Boolean | FlxSprite | ||
_caf : uint | FlxSprite | ||
_callback : Function | FlxSprite | ||
_color : uint | FlxSprite | ||
_complete : Function
Callback for when the effect is finished.
| FlxFade | ||
_ct : ColorTransform | FlxSprite | ||
_curAnim : FlxAnim | FlxSprite | ||
_curFrame : uint | FlxSprite | ||
_delay : Number
How long the effect should last.
| FlxFade | ||
_facing : uint | FlxSprite | ||
_fixed : Boolean
Internal tracker for whether an object will move/alter position after a collision (see
fixed ). | FlxObject | ||
_flashPoint : Point
This is a pre-allocated Flash Point object, which is useful for certain Flash graphics API calls
| FlxObject | ||
_flashPointZero : Point | FlxSprite | ||
_flashRect : Rectangle | FlxSprite | ||
_flashRect2 : Rectangle | FlxSprite | ||
_flicker : Boolean
Internal helper used for retro-style flickering.
| FlxObject | ||
_flickerTimer : Number
Internal helper used for retro-style flickering.
| FlxObject | ||
_flipped : uint | FlxSprite | ||
_framePixels : BitmapData | FlxSprite | ||
_frameTimer : Number | FlxSprite | ||
_gfx : Graphics [static]
| FlxSprite | ||
_gfxSprite : Sprite [static]
| FlxSprite | ||
_mtx : Matrix | FlxSprite | ||
_pixels : BitmapData | FlxSprite | ||
_point : FlxPoint
This is just a pre-allocated x-y point container to be used however you like
| FlxObject | ||
_rect : FlxRect
This is just a pre-allocated rectangle container to be used however you like
| FlxObject | ||
_solid : Boolean
Internal tracker for whether or not the object collides (see
solid ). | FlxObject |
Method | Defined by | ||
---|---|---|---|
FlxFade()
Constructor initializes the fade object
| FlxFade | ||
addAnimation(Name:String, Frames:Array, FrameRate:Number = 0, Looped:Boolean = true):void
Adds a new animation to the sprite.
| FlxSprite | ||
addAnimationCallback(AnimationCallback:Function):void
Pass in a function to be called whenever this sprite's animation changes.
| FlxSprite | ||
If you don't want to call
FlxU.collide() you can use this instead. | FlxObject | ||
createGraphic(Width:uint, Height:uint, Color:uint = 0xffffffff, Unique:Boolean = false, Key:String = null):FlxSprite
This function creates a flat colored square image dynamically.
| FlxSprite | ||
destroy():void
Called by
FlxGroup , commonly when game states are changed. | FlxObject | ||
This function draws or stamps one
FlxSprite onto another. | FlxSprite | ||
drawLine(StartX:Number, StartY:Number, EndX:Number, EndY:Number, Color:uint, Thickness:uint = 1):void
This function draws a line on this sprite from position X1,Y1
to position X2,Y2 with the specified color.
| FlxSprite | ||
fill(Color:uint):void
Fills this sprite's graphic with a specific color.
| FlxSprite | ||
flicker(Duration:Number = 1):void
Tells this object to flicker, retro-style.
| FlxObject | ||
flickering():Boolean
Check to see if the object is still flickering.
| FlxObject | ||
getBoundingColor():uint
Returns the appropriate color for the bounding box depending on object state.
| FlxObject | ||
Call this function to figure out the on-screen position of the object.
| FlxSprite | ||
Called when this object's bottom edge collides with the top of another
FlxObject . | FlxObject | ||
Called when this object's left side collides with another
FlxObject 's right. | FlxObject | ||
Called when this object's right side collides with another
FlxObject 's left. | FlxObject | ||
Since most games have identical behavior for running into walls,
you can just override this function instead of overriding both hitLeft and hitRight.
| FlxObject | ||
Called when this object's top collides with the bottom of another
FlxObject . | FlxObject | ||
hurt(Damage:Number):void
Call this function to "damage" (or give health bonus) to this sprite.
| FlxObject | ||
kill():void
Call this function to "kill" a sprite so that it no longer 'exists'.
| FlxObject | ||
loadGraphic(Graphic:Class, Animated:Boolean = false, Reverse:Boolean = false, Width:uint = 0, Height:uint = 0, Unique:Boolean = false):FlxSprite
Load an image from an embedded graphic file.
| FlxSprite | ||
loadRotatedGraphic(Graphic:Class, Rotations:uint = 16, Frame:int = -1, AntiAliasing:Boolean = false, AutoBuffer:Boolean = false):FlxSprite
Create a pre-rotated sprite sheet from a simple sprite.
| FlxSprite | ||
onEmit():void
Triggered whenever this sprite is launched by a
FlxEmitter . | FlxSprite | ||
onScreen():Boolean
Check and see if this object is currently on screen.
| FlxObject | ||
Checks to see if some
FlxObject object overlaps this FlxObject object. | FlxObject | ||
overlapsPoint(X:Number, Y:Number, PerPixel:Boolean = false):Boolean
Checks to see if a point in 2D space overlaps this FlxCore object.
| FlxSprite | ||
play(AnimName:String, Force:Boolean = false):void
Plays an existing animation (e.g.
| FlxSprite | ||
preCollide(Object:FlxObject):void
FlxU.collide() (and thus FlxObject.collide() ) call
this function each time two objects are compared to see if they collide. | FlxObject | ||
randomFrame():void
Tell the sprite to change to a random frame of animation
Useful for instantiating particles or other weird things.
| FlxSprite | ||
refreshHulls():void
Called by
FlxObject.updateMotion() and some constructors to
rebuild the basic collision data for this object. | FlxObject | ||
render():void
Called by game loop, updates then blits or renders current frame of animation to the screen
| FlxSprite | ||
reset(X:Number, Y:Number):void
Handy function for reviving game objects.
| FlxObject | ||
start(Color:uint = 0xff000000, Duration:Number = 1, FadeComplete:Function = null, Force:Boolean = false):void
Reset and trigger this special effect
| FlxFade | ||
stop():void
Stops and hides this screen effect.
| FlxFade | ||
toString():String
Convert object to readable string name.
| FlxPoint | ||
unsafeBind(Pixels:BitmapData):void
Internal function, currently only used to quickly update FlxState.screen for post-processing.
| FlxSprite | ||
update():void
Updates and/or animates this special effect
| FlxFade |
_complete | property |
protected var _complete:Function
Callback for when the effect is finished.
_delay | property |
protected var _delay:Number
How long the effect should last.
FlxFade | () | constructor |
public function FlxFade()
Constructor initializes the fade object
start | () | method |
public function start(Color:uint = 0xff000000, Duration:Number = 1, FadeComplete:Function = null, Force:Boolean = false):void
Reset and trigger this special effect
ParametersColor:uint (default = 0xff000000 ) — The color you want to use
|
|
Duration:Number (default = 1 ) — How long it should take to fade the screen out
|
|
FadeComplete:Function (default = null ) — A function you want to run when the fade finishes
|
|
Force:Boolean (default = false ) — Force the effect to reset
|
stop | () | method |
public function stop():void
Stops and hides this screen effect.
update | () | method |
public override function update():void
Updates and/or animates this special effect