Package | stencyl.api.engine.scene |
Class | public class TileLayer |
Inheritance | TileLayer FlxObject FlxRect FlxPoint Object |
Property | Defined By | ||
---|---|---|---|
acceleration : FlxPoint
How fast the speed of this object is changing. | FlxObject | ||
active : Boolean
If an object is not alive, the game loop will not automatically call update() on it. | FlxObject | ||
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 | ||
bottom : Number [read-only]
The Y coordinate of the bottom of the rectangle. | FlxRect | ||
colHullX : FlxRect
These store a couple of useful numbers for speeding up collision resolution. | FlxObject | ||
colHullY : FlxRect
These store a couple of useful numbers for speeding up collision resolution. | FlxObject | ||
collideBottom : Boolean
Flag for direction collision resolution. | FlxObject | ||
collideLeft : Boolean
Flag for direction collision resolution. | FlxObject | ||
collideRight : Boolean
Flag for direction collision resolution. | FlxObject | ||
collideTop : Boolean
Flag for direction collision resolution. | FlxObject | ||
colOffsets : Array
An array of FlxPoint objects. | FlxObject | ||
colVector : FlxPoint
These store a couple of useful numbers for speeding up collision resolution. | FlxObject | ||
dead : Boolean
Handy for tracking gameplay or animations. | FlxObject | ||
drag : FlxPoint
This isn't drag exactly, more like deceleration that is only applied
when acceleration is not affecting the sprite. | FlxObject | ||
exists : Boolean
Kind of a global on/off switch for any objects descended from FlxObject. | FlxObject | ||
fixed : Boolean
If an object is 'fixed' in space, it will not budge when it collides with a not-fixed object. | FlxObject | ||
_group : Boolean
Dedicated internal flag for whether or not this class is a FlxGroup. | FlxObject | ||
health : Number
Handy for storing health percentage or armor points or whatever. | FlxObject | ||
height : Number | FlxRect | ||
layerID : Number | TileLayer | ||
left : Number [read-only]
The X coordinate of the left side of the rectangle. | FlxRect | ||
maxAngular : Number
Use in conjunction with angularAcceleration for fluid spin speed control. | FlxObject | ||
maxThrust : Number
Used to cap thrust, helpful and easy!
| 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 | ||
name : String | TileLayer | ||
numCols : Number | TileLayer | ||
numRows : Number | TileLayer | ||
onFloor : Boolean
Flag that indicates whether or not you just hit the floor. | FlxObject | ||
origin : FlxPoint
WARNING: The origin of the sprite will default to its center. | FlxObject | ||
right : Number [read-only]
The X coordinate of the right side of the rectangle. | FlxRect | ||
rows : Array | TileLayer | ||
scene : Scene | TileLayer | ||
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
If an object is dead, the functions that automate collisions will skip it (see FlxG.overlapArrays() and FlxG.collideArrays()). | FlxObject | ||
thrust : Number
If you want to do Asteroids style stuff, check out thrust,
instead of directly accessing the object's velocity or acceleration. | FlxObject | ||
top : Number [read-only]
The Y coordinate of the top of the rectangle. | FlxRect | ||
updateTiles : Array | TileLayer | ||
velocity : FlxPoint
The basic speed of this object. | FlxObject | ||
visible : Boolean
If an object is not visible, the game loop will not automatically call render() on it. | FlxObject | ||
width : Number | FlxRect | ||
x : Number | FlxPoint | ||
y : Number | FlxPoint | ||
zOrder : Number | TileLayer |
Property | Defined By | ||
---|---|---|---|
_alphaCT : ColorTransform | TileLayer | ||
_data : Array | TileLayer | ||
_flashPoint : Point
This is a pre-allocated Flash Point object, which is useful for certain Flash graphics API calls
| FlxObject | ||
_flicker : Boolean
Internal helper used for retro-style flickering. | FlxObject | ||
_flickerTimer : Number
Internal helper used for retro-style flickering. | FlxObject | ||
_mtx : Matrix | TileLayer | ||
original : ColorTransform | TileLayer | ||
_pixels : BitmapData | TileLayer | ||
_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 | TileLayer | ||
_translatedSource : Rectangle | TileLayer |
Method | Defined By | ||
---|---|---|---|
TileLayer | |||
FlxObject | |||
destroy():void
Called by FlxGroup, commonly when game states are changed. | FlxObject | ||
draw(viewX:Number, viewY:Number, alpha:Number):void | TileLayer | ||
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 | ||
TileLayer | |||
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 | ||
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
Override this function to draw graphics (see FlxSprite). | FlxObject | ||
reset(X:Number, Y:Number):void
Handy function for reviving game objects. | FlxObject | ||
TileLayer | |||
toString():String
Convert object to readable string name. | FlxPoint | ||
update():void
Called by the main game loop, handles motion/physics and game logic
| FlxObject | ||
updateAnimated():void | TileLayer |
_alphaCT | property |
protected var _alphaCT:ColorTransform
_data | property |
protected var _data:Array
_mtx | property |
protected var _mtx:Matrix
_pixels | property |
protected var _pixels:BitmapData
_rects | property |
protected var _rects:Array
_translatedSource | property |
protected var _translatedSource:Rectangle
layerID | property |
public var layerID:Number
name | property |
public var name:String
numCols | property |
public var numCols:Number
numRows | property |
public var numRows:Number
original | property |
protected var original:ColorTransform
rows | property |
public var rows:Array
scene | property |
public var scene:Scene
updateTiles | property |
public var updateTiles:Array
zOrder | property |
public var zOrder:Number
TileLayer | () | Constructor |
public function TileLayer(layerID:Number, zOrder:Number, scene:Scene, numCols:Number, numRows:Number)
layerID:Number | |
zOrder:Number | |
scene:Scene | |
numCols:Number | |
numRows:Number |
draw | () | method |
public function draw(viewX:Number, viewY:Number, alpha:Number):void
Parameters
viewX:Number | |
viewY:Number | |
alpha:Number |
getTileAt | () | method |
setTileAt | () | method |
public function setTileAt(row:Number, col:Number, tile:Tile):void
Parameters
row:Number | |
col:Number | |
tile:Tile |
updateAnimated | () | method |
public function updateAnimated():void