Package | org.flixel |
Class | public class FlxTileblock |
Inheritance | FlxTileblock ![]() ![]() ![]() ![]() |
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 | |
![]() | 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 | |
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 | |
![]() | 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]
Called by the main game loop, handles motion/physics and game logic
| FlxObject |
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 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).
| |
TileHeight:uint (default = 0 )
| |
Empties:uint (default = 0 )
|
FlxTileblock |