Packagecom.whirled.contrib.platformer.piece
Classpublic class Piece
SubclassesBoundedPiece

The base class for any object that will exist in the platformer.



Public Properties
 PropertyDefined by
  height : int
The piece size.
Piece
  id : int
The piece id.
Piece
  nudgeH : Boolean
Piece
  nudgeW : Boolean
Piece
  nudgeX : Boolean
The piece sprite bound offsets.
Piece
  nudgeY : Boolean
Piece
  orient : int
The orientation.
Piece
  sHeight : int
[read-only]
Piece
  sprite : String = ""
The piece sprite name.
Piece
  sWidth : int
[read-only]
Piece
  sX : int
[read-only]
Piece
  sY : int
[read-only]
Piece
  type : String = ""
The piece type.
Piece
  width : int
Piece
  x : int
The piece coordinates.
Piece
  y : int
Piece
Public Methods
 MethodDefined by
  
Piece(defxml:XML = null, insxml:XML = null)
Piece
  
Get the editable attributes.
Piece
  
setXMLEditables(xml:XML):void
Piece
  
toString():String
Piece
  
xmlDef():XML
Get the XML piece definition.
Piece
  
Get the XML instance definition.
Piece
Property detail
heightproperty
public var height:int

The piece size.

idproperty 
public var id:int

The piece id.

nudgeHproperty 
public var nudgeH:Boolean
nudgeWproperty 
public var nudgeW:Boolean
nudgeXproperty 
public var nudgeX:Boolean

The piece sprite bound offsets.

nudgeYproperty 
public var nudgeY:Boolean
orientproperty 
public var orient:int

The orientation.

sHeightproperty 
sHeight:int  [read-only]Implementation
    public function get sHeight():int
spriteproperty 
public var sprite:String = ""

The piece sprite name.

sWidthproperty 
sWidth:int  [read-only]Implementation
    public function get sWidth():int
sXproperty 
sX:int  [read-only]Implementation
    public function get sX():int
sYproperty 
sY:int  [read-only]Implementation
    public function get sY():int
typeproperty 
public var type:String = ""

The piece type.

widthproperty 
public var width:int
xproperty 
public var x:int

The piece coordinates.

yproperty 
public var y:int
Constructor detail
Piece()constructor
public function Piece(defxml:XML = null, insxml:XML = null)Parameters
defxml:XML (default = null)
 
insxml:XML (default = null)
Method detail
getXMLEditables()method
public function getXMLEditables():XML

Get the editable attributes.

Returns
XML
setXMLEditables()method 
public function setXMLEditables(xml:XML):voidParameters
xml:XML
toString()method 
public function toString():String

Returns
String
xmlDef()method 
public function xmlDef():XML

Get the XML piece definition.

Returns
XML
xmlInstance()method 
public function xmlInstance():XML

Get the XML instance definition.

Returns
XML