Package | stencyl.api.engine.gui |
Class | public class Panel |
Inheritance | Panel FlxGroup FlxObject FlxRect FlxPoint Object |
Implements | Component |
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 | ||
bottomEdge : BitmapData | Panel | ||
bottomLeft : BitmapData | Panel | ||
bottomRight : BitmapData | Panel | ||
cache : BitmapData | Panel | ||
center : BitmapData | Panel | ||
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 | ||
color : uint = 0x00ffffff | Panel | ||
colVector : FlxPoint
These store a couple of useful numbers for speeding up collision resolution. | FlxObject | ||
ct : ColorTransform | Panel | ||
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 | ||
game : GameState | Panel | ||
_group : Boolean
Dedicated internal flag for whether or not this class is a FlxGroup. | FlxObject | ||
hasBackground : Boolean | Panel | ||
health : Number
Handy for storing health percentage or armor points or whatever. | FlxObject | ||
height : Number | FlxRect | ||
ID : int | FlxGroup | ||
left : Number [read-only]
The X coordinate of the left side of the rectangle. | FlxRect | ||
leftEdge : BitmapData | Panel | ||
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 | ||
members : Array
Array of all the FlxObjects that exist in this layer. | FlxGroup | ||
moves : Boolean
Set this to false if you want to skip the automatic motion/movement stuff (see updateMotion()). | FlxObject | ||
name : String | FlxGroup | ||
onFloor : Boolean
Flag that indicates whether or not you just hit the floor. | FlxObject | ||
_opacity : Number = 256 | Panel | ||
opacity : Number | Panel | ||
origin : FlxPoint
WARNING: The origin of the sprite will default to its center. | FlxObject | ||
parent : Panel | Panel | ||
right : Number [read-only]
The X coordinate of the right side of the rectangle. | FlxRect | ||
rightEdge : BitmapData | Panel | ||
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 | ||
topEdge : BitmapData | Panel | ||
topLeft : BitmapData | Panel | ||
topRight : BitmapData | Panel | ||
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 |
Method | Defined By | ||
---|---|---|---|
Panel(x:int, y:int, w:int, h:int) | Panel | ||
Adds a new FlxObject subclass (FlxSprite, FlxBlock, etc) to the list of children
| FlxGroup | ||
addComponent(c:Component):void | Panel | ||
bringForward(c:Component):void | Panel | ||
bringToFront(c:Component):void | Panel | ||
FlxObject | |||
Panel | |||
countDead():int
Call this function to find out how many members of the group are dead. | FlxGroup | ||
countLiving():int
Call this function to find out how many members of the group are not dead. | FlxGroup | ||
countOnScreen():int
Returns a count of how many objects in this group are on-screen right now. | FlxGroup | ||
destroy():void [override]
Override this function to handle any deleting or "shutdown" type operations you might need,
such as removing traditional Flash children like Sprite objects. | FlxGroup | ||
fadeTo(value:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void | Panel | ||
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 | ||
getAngle():Number | Panel | ||
getComponents():Array | Panel | ||
Call this function to retrieve the first object with dead == false in the group. | FlxGroup | ||
Call this function to retrieve the first object with exists == false in the group. | FlxGroup | ||
Call this function to retrieve the first object with dead == true in the group. | FlxGroup | ||
Call this function to retrieve the first object with exists == true in the group. | FlxGroup | ||
getFirstNull():int
Call this function to retrieve the first index set to 'null'. | FlxGroup | ||
getHeight():Number | Panel | ||
getNumComponents():int | Panel | ||
getOpacity():Number | Panel | ||
Panel | |||
getParentX():Number | Panel | ||
getParentY():Number | Panel | ||
Returns a member at random from the group. | FlxGroup | ||
Call this function to figure out the on-screen position of the object. | FlxObject | ||
getWidth():Number | Panel | ||
getX():Number | Panel | ||
getY():Number | Panel | ||
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 | ||
isVisible():Boolean | Panel | ||
kill():void [override]
Calls kill on the group and all its members. | FlxGroup | ||
moveBy(x:Number, y:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void | Panel | ||
moveTo(x:Number, y:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void | Panel | ||
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 | ||
pack():void | Panel | ||
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 | ||
Removes an object from the group. | FlxGroup | ||
removeComponent(c:Component):void | Panel | ||
render():void [override] | Panel | ||
Replaces an existing FlxObject with a new one. | FlxGroup | ||
reset(X:Number, Y:Number):void [override]
If the group's position is reset, we want to reset all its members too. | FlxGroup | ||
resetFirstAvail(X:Number = 0, Y:Number = 0):Boolean
Finds the first object with exists == false and calls reset on it. | FlxGroup | ||
sendBackward(c:Component):void | Panel | ||
sendToBack(c:Component):void | Panel | ||
setBackground(img:BitmapData, cornerWidth:int, cornerHeight:int):void | Panel | ||
setOpacity(opacity:Number):void | Panel | ||
setParentPanel(p:Panel):void | Panel | ||
setVisible(isVisible:Boolean):void | Panel | ||
spinBy(angle:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void | Panel | ||
spinTo(angle:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void | Panel | ||
toString():String [override] | FlxGroup | ||
update():void [override] | Panel |
_opacity | property |
public var _opacity:Number = 256
bottomEdge | property |
public var bottomEdge:BitmapData
bottomLeft | property |
public var bottomLeft:BitmapData
bottomRight | property |
public var bottomRight:BitmapData
cache | property |
public var cache:BitmapData
center | property |
public var center:BitmapData
color | property |
public var color:uint = 0x00ffffff
ct | property |
public var ct:ColorTransform
game | property |
public var game:GameState
hasBackground | property |
public var hasBackground:Boolean
leftEdge | property |
public var leftEdge:BitmapData
opacity | property |
opacity:Number
public function get opacity():Number
public function set opacity(value:Number):void
parent | property |
public var parent:Panel
rightEdge | property |
public var rightEdge:BitmapData
topEdge | property |
public var topEdge:BitmapData
topLeft | property |
public var topLeft:BitmapData
topRight | property |
public var topRight:BitmapData
Panel | () | Constructor |
public function Panel(x:int, y:int, w:int, h:int)
x:int | |
y:int | |
w:int | |
h:int |
addComponent | () | method |
bringForward | () | method |
bringToFront | () | method |
contains | () | method |
fadeTo | () | method |
public function fadeTo(value:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void
Parameters
value:Number | |
duration:int (default = 1000 )
| |
easing:String (default = linear )
| |
delay:int (default = 0 )
|
getAngle | () | method |
public function getAngle():Number
ReturnsNumber |
getComponents | () | method |
public function getComponents():Array
ReturnsArray |
getHeight | () | method |
public function getHeight():Number
ReturnsNumber |
getNumComponents | () | method |
public function getNumComponents():int
Returnsint |
getOpacity | () | method |
public function getOpacity():Number
ReturnsNumber |
getParentPanel | () | method |
getParentX | () | method |
public function getParentX():Number
ReturnsNumber |
getParentY | () | method |
public function getParentY():Number
ReturnsNumber |
getWidth | () | method |
public function getWidth():Number
ReturnsNumber |
getX | () | method |
public function getX():Number
ReturnsNumber |
getY | () | method |
public function getY():Number
ReturnsNumber |
isVisible | () | method |
public function isVisible():Boolean
ReturnsBoolean |
moveBy | () | method |
public function moveBy(x:Number, y:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void
Parameters
x:Number | |
y:Number | |
duration:int (default = 1000 )
| |
easing:String (default = linear )
| |
delay:int (default = 0 )
|
moveTo | () | method |
public function moveTo(x:Number, y:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void
Parameters
x:Number | |
y:Number | |
duration:int (default = 1000 )
| |
easing:String (default = linear )
| |
delay:int (default = 0 )
|
pack | () | method |
public function pack():void
removeComponent | () | method |
render | () | method |
override public function render():void
sendBackward | () | method |
sendToBack | () | method |
setBackground | () | method |
public function setBackground(img:BitmapData, cornerWidth:int, cornerHeight:int):void
Parameters
img:BitmapData | |
cornerWidth:int | |
cornerHeight:int |
setOpacity | () | method |
public function setOpacity(opacity:Number):void
Parameters
opacity:Number |
setParentPanel | () | method |
setVisible | () | method |
public function setVisible(isVisible:Boolean):void
Parameters
isVisible:Boolean |
spinBy | () | method |
public function spinBy(angle:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void
Parameters
angle:Number | |
duration:int (default = 1000 )
| |
easing:String (default = linear )
| |
delay:int (default = 0 )
|
spinTo | () | method |
public function spinTo(angle:Number, duration:int = 1000, easing:String = linear, delay:int = 0):void
Parameters
angle:Number | |
duration:int (default = 1000 )
| |
easing:String (default = linear )
| |
delay:int (default = 0 )
|
update | () | method |
override public function update():void