Package | org.flixel |
Class | public class FlxParticle |
Inheritance | FlxParticle ![]() ![]() ![]() ![]() |
Property | Defined By | ||
---|---|---|---|
![]() | acceleration : FlxPoint
How fast the speed of this object is changing. | FlxObject | |
![]() | active : Boolean
Controls whether update() is automatically called by FlxState/FlxGroup. | FlxBasic | |
![]() | _ACTIVECOUNT : uint [static] | FlxBasic | |
![]() | alive : Boolean
Useful state for many game objects - "dead" (!alive) vs alive. | FlxBasic | |
![]() | allowCollisions : uint
Bit field of flags (use with UP, DOWN, LEFT, RIGHT, etc) indicating collision directions. | FlxObject | |
![]() | alpha : Number
Set alpha to a number between 0 and 1 to change the opacity of the sprite. | FlxSprite | |
![]() | angle : Number
Set the angle of a sprite to rotate it. | FlxObject | |
![]() | angularAcceleration : Number
How fast the spin speed should change. | FlxObject | |
![]() | angularDrag : Number
Like drag but for spinning. | FlxObject | |
![]() | angularVelocity : Number
This is how fast you want this sprite to spin. | FlxObject | |
![]() | antialiasing : Boolean
Controls whether the object is smoothed when rotated, affects performance. | FlxSprite | |
![]() | blend : String
Blending modes, just like Photoshop!
E.g. | FlxSprite | |
![]() | cameras : Array | FlxSprite | |
![]() | color : uint
Set color to a number in this format: 0xRRGGBB. | FlxSprite | |
![]() | dirty : Boolean
Set this flag to true to force the sprite to update during the draw() call. | FlxSprite | |
![]() | drag : FlxPoint
This isn't drag exactly, more like deceleration that is only applied
when acceleration is not affecting the sprite. | FlxObject | |
![]() | elasticity : Number | FlxObject | |
![]() | exists : Boolean
Controls whether update() and draw() are automatically called by FlxState/FlxGroup. | FlxBasic | |
![]() | facing : uint
Set facing using FlxSprite.LEFT,RIGHT,
UP, and DOWN to take advantage of
flipped sprites and/or just track player orientation more easily. | FlxSprite | |
![]() | finished : Boolean
Whether the current animation has finished its first (or only) loop. | FlxSprite | |
![]() | flickering : Boolean [read-only]
Check to see if the object is still flickering. | FlxObject | |
![]() | frame : uint
Tell the sprite to change to a specific frame of animation. | FlxSprite | |
![]() | frameHeight : uint
The height of the actual graphic or image being displayed (not necessarily the game object/bounding box). | FlxSprite | |
![]() | frames : uint
The total number of frames in this image (assumes each row is full). | FlxSprite | |
![]() | frameWidth : uint
The width of the actual graphic or image being displayed (not necessarily the game object/bounding box). | FlxSprite | |
![]() | health : Number
Handy for storing health percentage or armor points or whatever. | FlxObject | |
![]() | height : Number | FlxObject | |
![]() | ID : int
IDs seem like they could be pretty useful, huh?
| FlxBasic | |
![]() | immovable : Boolean
Whether an object will move/alter position after a collision. | FlxObject | |
![]() | last : FlxPoint | FlxObject | |
lifespan : Number | FlxParticle | ||
![]() | mass : Number | FlxObject | |
![]() | maxAngular : Number
Use in conjunction with angularAcceleration for fluid spin speed control. | FlxObject | |
![]() | maxVelocity : FlxPoint
If you are using acceleration, you can use maxVelocity with it
to cap the speed automatically (very useful!). | FlxObject | |
![]() | moves : Boolean
Set this to false if you want to skip the automatic motion/movement stuff (see updateMotion()). | FlxObject | |
![]() | offset : FlxPoint
If you changed the size of your sprite object to shrink the bounding box,
you might need to offset the new bounding box from the top-left corner of the sprite. | FlxSprite | |
![]() | origin : FlxPoint
WARNING: The origin of the sprite will default to its center. | FlxSprite | |
![]() | pixels : BitmapData
Set pixels to any BitmapData object. | FlxSprite | |
![]() | scale : FlxPoint
Change the size of your sprite's graphic. | FlxSprite | |
![]() | scrollFactor : FlxPoint
A point that can store numbers from 0 to 1 (for X and Y independently)
that governs how much this object is affected by the camera subsystem. | FlxObject | |
![]() | solid : Boolean | FlxObject | |
![]() | touching : uint
Bit field of flags (use with UP, DOWN, LEFT, RIGHT, etc) indicating surface contacts and collision qualities. | FlxObject | |
![]() | velocity : FlxPoint
The basic speed of this object. | FlxObject | |
![]() | visible : Boolean
Controls whether draw() is automatically called by FlxState/FlxGroup. | FlxBasic | |
![]() | _VISIBLECOUNT : uint [static] | FlxBasic | |
![]() | wasTouching : uint | FlxObject | |
![]() | width : Number | FlxObject | |
![]() | x : Number | FlxObject | |
![]() | y : Number | FlxObject |
Method | Defined By | ||
---|---|---|---|
FlxParticle | |||
![]() | 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 | |
![]() | corner():void | FlxSprite | |
![]() | destroy():void [override] | FlxSprite | |
![]() | draw():void [override]
Called by game loop, updates then blits or renders current frame of animation to the screen
| FlxSprite | |
![]() | drawFrame(Force:Boolean = false):void
Request (or force) that the sprite update the frame before rendering. | 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 | |
![]() | FlxObject | ||
![]() | [override]
Call this function to figure out the on-screen position of the object. | FlxSprite | |
![]() | hurt(Damage:Number):void
Reduces the "health" variable of this sprite by the amount specified in Damage. | FlxSprite | |
![]() | isTouching(Direction:uint):Boolean | FlxObject | |
![]() | justTouched(Direction:uint):Boolean | FlxObject | |
![]() | kill():void | FlxBasic | |
![]() | 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 | |
![]() | makeGraphic(Width:uint, Height:uint, Color:uint = 0xffffffff, Unique:Boolean = false, Key:String = null):FlxSprite
This function creates a flat colored square image dynamically. | FlxSprite | |
![]() | onEmit():void
Triggered whenever this sprite is launched by a FlxEmitter. | FlxSprite | |
![]() | [override]
Check and see if this object is currently on screen. | FlxSprite | |
![]() |
Checks to see if some FlxObject overlaps this FlxObject object in world space. | FlxObject | |
![]() | overlapsPoint(X:Number, Y:Number, Camera:FlxCamera = null, PerPixel:Boolean = false):Boolean [override]
Checks to see if a point in 2D world space overlaps this FlxCore object. | FlxSprite | |
![]() | play(AnimName:String, Force:Boolean = false):void
Plays an existing animation (e.g. | FlxSprite | |
![]() | postUpdate():void [override] | FlxSprite | |
![]() | preUpdate():void [override] | FlxObject | |
![]() | randomFrame():void
Tell the sprite to change to a random frame of animation
Useful for instantiating particles or other weird things. | FlxSprite | |
![]() | reset(X:Number, Y:Number):void
Handy function for reviving game objects. | FlxObject | |
![]() | revive():void | FlxBasic | |
![]() | [static] | FlxObject | |
![]() | [static] | FlxObject | |
![]() | [static] | FlxObject | |
![]() |
This function draws or stamps one FlxSprite onto another. | FlxSprite | |
![]() | toString():String
Convert object to readable string name. | FlxBasic | |
update():void [override] | FlxParticle |