| Package | org.flixel |
| Class | public class FlxTileblock |
| Inheritance | FlxTileblock FlxObject FlxRect FlxPoint |
| Property | Defined by | ||
|---|---|---|---|
![]() | _flashPoint : Point
This is a pre-allocated Flash Point object, which is useful for certain Flash graphics API calls
| FlxObject | |
| _flashRect : Rectangle
Rendering helper.
| FlxTileblock | ||
![]() | _flicker : Boolean
Internal helper used for retro-style flickering.
| FlxObject | |
![]() | _flickerTimer : Number
Internal helper used for retro-style flickering.
| FlxObject | |
| _pixels : BitmapData
Stores the tile strip from which the tiles are loaded.
| FlxTileblock | ||
![]() | _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 | |
| _rects : Array
Array of rectangles used to quickly blit the tiles to the screen.
| FlxTileblock | ||
| _tileSize : uint
The size of the tiles (e.g.
| 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 | ||
![]() |
If you don't want to call
FlxU.collide() you can use this instead. | FlxObject | |
![]() |
destroy():void
Called by
FlxGroup, commonly when game states are changed. | FlxObject | |
![]() |
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 | |
![]() |
Call this function to figure out the on-screen position of the object.
| FlxObject | |
![]() |
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 | |
![]() |
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(TileGraphic:Class, Empties:uint = 0):void
Fills the block with a randomly arranged selection of graphics from the image provided.
| FlxTileblock | ||
![]() |
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
FlxObject object. | FlxObject | |
![]() |
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 | |
![]() |
refreshHulls():void
Called by
FlxObject.updateMotion() and some constructors to
rebuild the basic collision data for this object. | FlxObject | |
|
render():void
Draws this block.
| FlxTileblock | ||
![]() |
reset(X:Number, Y:Number):void
Handy function for reviving game objects.
| FlxObject | |
![]() |
toString():String
Convert object to readable string name.
| FlxPoint | |
![]() |
update():void
Called by the main game loop, handles motion/physics and game logic
| FlxObject | |
| Method | Defined by | ||
|---|---|---|---|
|
renderBlock():void
Internal function to draw this block
| FlxTileblock | ||
![]() |
updateFlickering():void
Just updates the retro-style flickering.
| FlxObject | |
![]() |
updateMotion():void
Internal function for updating the position and speed of this object.
| FlxObject | |
| _flashRect | property |
protected var _flashRect:RectangleRendering helper.
| _pixels | property |
protected var _pixels:BitmapDataStores the tile strip from which the tiles are loaded.
| _rects | property |
protected var _rects:ArrayArray of rectangles used to quickly blit the tiles to the screen.
| _tileSize | property |
protected var _tileSize:uintThe size of the tiles (e.g. 8 means 8x8).
| 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.
|
| loadGraphic | () | method |
public function loadGraphic(TileGraphic:Class, Empties:uint = 0):voidFills the block with a randomly arranged selection of graphics from the image provided.
ParametersTileGraphic:Class — The graphic class that contains the tiles that should fill this block.
|
|
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).
|
| render | () | method |
public override function render():voidDraws this block.
| renderBlock | () | method |
protected function renderBlock():voidInternal function to draw this block