Package | org.flixel |
Class | public class FlxLayer |
Inheritance | FlxLayer ![]() |
Subclasses | FlxPause |
Property | Defined by | ||
---|---|---|---|
_children : Array
Array of all the FlxCore objects that exist in this layer.
| FlxLayer | ||
![]() | _flicker : Boolean
Internal helper used for retro-style flickering.
| FlxCore | |
![]() | _flickerTimer : Number
Internal helper used for retro-style flickering.
| FlxCore |
Method | Defined by | ||
---|---|---|---|
FlxLayer()
Constructor
| FlxLayer | ||
Adds a new FlxCore subclass (FlxSprite, FlxBlock, etc) to the list of children
| FlxLayer | ||
children():Array
Returns the array of children
| FlxLayer | ||
![]() |
Collides a
FlxCore against this object. | FlxCore | |
![]() |
collideArray(Cores:Array):void
Collides an array of
FlxCore objects against the tilemap. | FlxCore | |
![]() |
collideArrayX(Cores:Array):void
Collides an array of
FlxCore objects against the tilemap against the X axis only. | FlxCore | |
![]() |
collideArrayY(Cores:Array):void
Collides an array of
FlxCore objects against the tilemap against the Y axis only. | FlxCore | |
![]() |
Collides a
FlxCore against this object on the X axis ONLY. | FlxCore | |
![]() |
Collides a
FlxCore against this object on the Y axis ONLY. | FlxCore | |
destroy():void
Override this function to handle any deleting or "shutdown" type operations you might need,
such as removing traditional Flash children like Sprite objects.
| FlxLayer | ||
![]() |
flicker(Duration:Number = 1):void
Tells this object to flicker, retro-style.
| FlxCore | |
![]() |
flickering():Boolean
Check to see if the object is still flickering.
| FlxCore | |
![]() |
getScreenXY(P:Point = null):Point
Call this function to figure out the on-screen position of the object.
| FlxCore | |
![]() |
hitCeiling(Contact:FlxCore = null):Boolean
Called when this object collides with the bottom of another
FlxCore . | FlxCore | |
![]() |
Called when this object collides with the top of another
FlxCore . | FlxCore | |
![]() |
Called when this object collides with another
FlxCore on one of its sides. | FlxCore | |
![]() |
kill():void
Call this function to "kill" a sprite so that it no longer 'exists'.
| FlxCore | |
![]() |
onScreen():Boolean
Check and see if this object is currently on screen.
| FlxCore | |
![]() |
Checks to see if some
FlxCore object overlaps this FlxCore object. | FlxCore | |
![]() |
overlapsPoint(X:Number, Y:Number, PerPixel:Boolean = false):Boolean
Checks to see if a point in 2D space overlaps this
FlxCore object. | FlxCore | |
render():void
Automatically goes through and calls render on everything you added,
override this loop to control render order manually.
| FlxLayer | ||
![]() |
reset(X:Number, Y:Number):void
Handy function for reviving game objects.
| FlxCore | |
update():void
Automatically goes through and calls update on everything you added,
override this function to handle custom input and perform collisions.
| FlxLayer |
_children | property |
protected var _children:Array
Array of all the FlxCore objects that exist in this layer.
FlxLayer | () | constructor |
public function FlxLayer()
Constructor
add | () | method |
public function add(Core:FlxCore, ShareScroll:Boolean = false):FlxCore
Adds a new FlxCore subclass (FlxSprite, FlxBlock, etc) to the list of children
ParametersCore:FlxCore — The object you want to add
|
|
ShareScroll:Boolean (default = false ) — Whether or not this FlxCore should sync up with this layer's scrollFactor
|
FlxCore —
The same FlxCore object that was passed in.
|
children | () | method |
public function children():Array
Returns the array of children
ReturnsArray |
destroy | () | method |
public override function destroy():void
Override this function to handle any deleting or "shutdown" type operations you might need, such as removing traditional Flash children like Sprite objects.
render | () | method |
public override function render():void
Automatically goes through and calls render on everything you added, override this loop to control render order manually.
update | () | method |
public override function update():void
Automatically goes through and calls update on everything you added, override this function to handle custom input and perform collisions.