Package | org.flixel |
Class | public class FlxTileblock |
Inheritance | FlxTileblock FlxSprite FlxObject FlxBasic Object |
Method | Defined By | ||
---|---|---|---|
FlxTileblock(X:int, Y:int, Width:uint, Height:uint)
Creates a new FlxBlock object with the specified position and size. | FlxTileblock | ||
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 | ||
centerOffsets(AdjustPosition:Boolean = false):void
Helper function that adjusts the offset automatically to center the bounding box within the graphic. | FlxSprite | ||
destroy():void [override]
Clean up memory. | FlxSprite | ||
draw():void [override]
Called by game loop, updates then blits or renders current frame of animation to the screen
| FlxSprite | ||
[override]
Override this function to draw custom "debug mode" graphics to the
specified camera while the debugger's visual mode is toggled on. | FlxObject | ||
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 | ||
followPath(Path:FlxPath, Speed:Number = 100, Mode:uint, AutoRotate:Boolean = false):void
Call this function to give this object a path to follow. | FlxObject | ||
Retrieve the midpoint of this object in world coordinates. | FlxObject | ||
Call this function to figure out the on-screen position of the object. | FlxObject | ||
hurt(Damage:Number):void
Reduces the "health" variable of this sprite by the amount specified in Damage. | FlxObject | ||
isTouching(Direction:uint):Boolean
Handy function for checking if this object is touching a particular surface. | FlxObject | ||
justTouched(Direction:uint):Boolean
Handy function for checking if this object is just landed on a particular surface. | FlxObject | ||
kill():void
Handy function for "killing" game objects. | 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 | ||
loadTiles(TileGraphic:Class, TileWidth:uint = 0, TileHeight:uint = 0, Empties:uint = 0):FlxTileblock
Fills the block with a randomly arranged selection of graphics from the image provided. | FlxTileblock | ||
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 | ||
[override]
Check and see if this object is currently on screen. | FlxSprite | ||
Checks to see if some FlxObject overlaps this FlxObject or FlxGroup. | FlxObject | ||
overlapsAt(X:Number, Y:Number, ObjectOrGroup:FlxBasic, InScreenSpace:Boolean = false, Camera:FlxCamera = null):Boolean
Checks to see if this FlxObject were located at the given position, would it overlap the FlxObject or FlxGroup?
This is distinct from overlapsPoint(), which just checks that point, rather than taking the object's size into account. | FlxObject | ||
Checks to see if a point in 2D world space overlaps this FlxObject object. | FlxObject | ||
Checks to see if a point in 2D world space overlaps this FlxSprite object's current displayed pixels. | FlxSprite | ||
play(AnimName:String, Force:Boolean = false):void
Plays an existing animation (e.g. | FlxSprite | ||
postUpdate():void [override]
Automatically called after update() by the game loop,
this function just calls updateAnimation(). | FlxSprite | ||
preUpdate():void [override]
Pre-update is called right before update() on each object in the game loop. | FlxObject | ||
randomFrame():void
Tell the sprite to change to a random frame of animation
Useful for instantiating particles or other weird things. | FlxSprite | ||
replaceColor(Color:uint, NewColor:uint, FetchPositions:Boolean = false):Array | FlxSprite | ||
reset(X:Number, Y:Number):void
Handy function for reviving game objects. | FlxObject | ||
revive():void
Handy function for bringing game objects "back to life". | FlxBasic | ||
[static]
The main collision resolution function in flixel. | FlxObject | ||
[static]
The X-axis component of the object separation process. | FlxObject | ||
[static]
The Y-axis component of the object separation process. | FlxObject | ||
setOriginToCorner():void
Helper function that just sets origin to (0,0)
| FlxSprite | ||
This function draws or stamps one FlxSprite onto another. | FlxSprite | ||
stopFollowingPath(DestroyPath:Boolean = false):void
Tells this object to stop following the path its on. | FlxObject | ||
toString():String
Convert object to readable string name. | FlxBasic | ||
update():void
Override this function to update your class's position and appearance. | FlxBasic |
FlxTileblock | () | Constructor |
public function FlxTileblock(X:int, Y:int, Width:uint, Height:uint)
Creates a new FlxBlock
object with the specified position and size.
X:int — The X position of the block.
| |
Y:int — The Y position of the block.
| |
Width:uint — The width of the block.
| |
Height:uint — The height of the block.
|
loadTiles | () | method |
public function loadTiles(TileGraphic:Class, TileWidth:uint = 0, TileHeight:uint = 0, Empties:uint = 0):FlxTileblock
Fills the block with a randomly arranged selection of graphics from the image provided.
Parameters
TileGraphic:Class — The graphic class that contains the tiles that should fill this block.
| |
TileWidth:uint (default = 0 ) — The width of a single tile in the graphic.
| |
TileHeight:uint (default = 0 ) — The height of a single tile in the graphic.
| |
Empties:uint (default = 0 ) — The number of "empty" tiles to add to the auto-fill algorithm (e.g. 8 tiles + 4 empties = 1/3 of block will be open holes).
|
FlxTileblock |