Packagecom.whirled.contrib.platformer.piece
Classpublic class Actor
InheritanceActor Inheritance Dynamic

A game actor that has orientation, acceleration and health.



Public Properties
 PropertyDefined by
  accelX : Number
Actor
  accelY : Number
Actor
  attached : LineData
[read-only]
Actor
  attachedId : int
[read-only]
Actor
  disabled : Boolean
Actor
 Inheriteddx : Number
Dynamic
 Inheriteddy : Number
Dynamic
 InheritedenemyCount : int
Dynamic
  events : Array
Actor
  health : Number
Actor
  height : Number
Actor
 Inheritedid : int
Dynamic
 Inheritedinter : int
Dynamic
  justShot : Boolean
Actor
  killer : int
Actor
  maxAttachable : Number = -1
Actor
  maxWalkable : Number = -1
Actor
  orient : int
Actor
 Inheritedowner : int
Dynamic
  projCollider : Boolean = false
Actor
  shooting : Boolean
Actor
 InheritedsoundEvents : Array
Dynamic
 Inheritedsprite : String
Dynamic
  startHealth : Number
Actor
 Inheritedtype : String
Dynamic
 InheritedupdateState : int
Dynamic
  wasHit : int
Actor
  width : Number
Actor
 Inheritedx : Number
Dynamic
 Inheritedy : Number
Dynamic
Protected Properties
 PropertyDefined by
  _accelX : Number = 0
Actor
  _accelY : Number = 0
Actor
  _attached : LineData
Actor
  _attachedId : int = -1
Actor
  _bounds : Rect
Actor
  _disabled : Boolean
Actor
 Inherited_dx : Number = 0
Dynamic
 Inherited_dy : Number = 0
Dynamic
  _health : Number
Actor
  _height : Number = 0
Actor
 Inherited_inState : int
Dynamic
 Inherited_inter : int
Dynamic
  _justShot : Boolean = false
Actor
  _killer : int
Actor
  _orient : int
Actor
 Inherited_owner : int
Dynamic
  _shooting : Boolean = false
Actor
  _startHealth : Number
Actor
  _wasHit : int
Actor
  _width : Number = 0
Actor
 Inherited_x : Number = 0
Dynamic
 Inherited_y : Number = 0
Dynamic
Public Methods
 MethodDefined by
  
Actor(insxml:XML = null)
Actor
 Inherited
alwaysSpawn():Boolean
Dynamic
 Inherited
amOwner():Boolean
Dynamic
  
applyForce(fx:Number, fy:Number):void
Actor
  
doesHit(x:Number, y:Number, source:Object):Collision
Actor
 Inherited
equals(other:Object):Boolean
Dynamic
 Inherited
forceOwner():Boolean
Dynamic
  
fromBytes(bytes:ByteArray):void
Actor
  
Actor
 Inherited
getNewOwner(closest:int):int
Dynamic
 Inherited
hashCode():int
Dynamic
  
isAlive():Boolean
Actor
  
isAttached():Boolean
Actor
  
Actor
  
isOrientShootUp():Boolean
Actor
  
orientBody(body:int):void
Actor
  
orientShoot(shoot:int):void
Actor
 Inherited
ownerType():int
Dynamic
  
setAttached(ld:LineData, id:int = -1):void
Actor
  
shouldSpawn():Boolean
Actor
 Inherited
spawnDist():Number
Dynamic
  
toBytes(bytes:ByteArray = null):ByteArray
Actor
  
toString():String
Actor
 Inherited
useCache():Boolean
Dynamic
  
Actor
Public Constants
 ConstantDefined by
  ACT_COUNT : int = 9
[static]
Actor
 InheritedDEAD : int = 3
[static]
Dynamic
 InheritedDYN_COUNT : int = 2
[static]
Dynamic
 InheritedENEMY : int = 2
[static]
Dynamic
 InheritedGLOBAL : int = 0
[static]
Dynamic
  HIT_BACK : int
[static]
Actor
  HIT_BIG : int
[static]
Actor
  HIT_FRONT : int = 1
[static]
Actor
  ORIENT_LEFT : int = 0
[static]
Actor
  ORIENT_RIGHT : int = 1
[static]
Actor
  ORIENT_SHOOT_B : int
[static]
Actor
  ORIENT_SHOOT_D : int
[static]
Actor
  ORIENT_SHOOT_F : int
[static]
Actor
  ORIENT_SHOOT_MASK : int
[static]
Actor
  ORIENT_SHOOT_U : int
[static]
Actor
  ORIENT_TURNING : int
[static]
Actor
 InheritedOWN_ALL : int = 3
[static]
Dynamic
 InheritedOWN_PLAYER : int = 1
[static]
Dynamic
 InheritedOWN_SERVER : int = 2
[static]
Dynamic
 InheritedPLAYER : int = 1
[static]
Dynamic
 InheritedSPAWN : int = 4
[static]
Dynamic
  U_ACCEL : int
[static]
Actor
  U_ATTACH : int
[static]
Actor
  U_HEALTH : int
[static]
Actor
  U_HIT : int
[static]
Actor
 InheritedU_INTER : int
[static]
Dynamic
  U_ORIENT : int
[static]
Actor
 InheritedU_POS : int
[static]
Dynamic
  U_SHOOT : int
[static]
Actor
  U_UPGRADE : int
[static]
Actor
 InheritedU_VEL : int
[static]
Dynamic
Property detail
_accelXproperty
protected var _accelX:Number = 0
accelXproperty 
accelX:Number  [read-write]Implementation
    public function get accelX():Number
    public function set accelX(value:Number):void
_accelYproperty 
protected var _accelY:Number = 0
accelYproperty 
accelY:Number  [read-write]Implementation
    public function get accelY():Number
    public function set accelY(value:Number):void
_attachedproperty 
protected var _attached:LineData
attachedproperty 
attached:LineData  [read-only]Implementation
    public function get attached():LineData
_attachedIdproperty 
protected var _attachedId:int = -1
attachedIdproperty 
attachedId:int  [read-only]Implementation
    public function get attachedId():int
_boundsproperty 
protected var _bounds:Rect
_disabledproperty 
protected var _disabled:Boolean
disabledproperty 
disabled:Boolean  [read-write]Implementation
    public function get disabled():Boolean
    public function set disabled(value:Boolean):void
eventsproperty 
public var events:Array
_healthproperty 
protected var _health:Number
healthproperty 
health:Number  [read-write]Implementation
    public function get health():Number
    public function set health(value:Number):void
_heightproperty 
protected var _height:Number = 0
heightproperty 
height:Number  [read-write]Implementation
    public function get height():Number
    public function set height(value:Number):void
_justShotproperty 
protected var _justShot:Boolean = false
justShotproperty 
justShot:Boolean  [read-write]Implementation
    public function get justShot():Boolean
    public function set justShot(value:Boolean):void
_killerproperty 
protected var _killer:int
killerproperty 
killer:int  [read-write]Implementation
    public function get killer():int
    public function set killer(value:int):void
maxAttachableproperty 
public var maxAttachable:Number = -1
maxWalkableproperty 
public var maxWalkable:Number = -1
_orientproperty 
protected var _orient:int
orientproperty 
orient:int  [read-write]Implementation
    public function get orient():int
    public function set orient(value:int):void
projColliderproperty 
public var projCollider:Boolean = false
_shootingproperty 
protected var _shooting:Boolean = false
shootingproperty 
shooting:Boolean  [read-write]Implementation
    public function get shooting():Boolean
    public function set shooting(value:Boolean):void
_startHealthproperty 
protected var _startHealth:Number
startHealthproperty 
startHealth:Number  [read-write]Implementation
    public function get startHealth():Number
    public function set startHealth(value:Number):void
_wasHitproperty 
protected var _wasHit:int
wasHitproperty 
wasHit:int  [read-write]Implementation
    public function get wasHit():int
    public function set wasHit(value:int):void
_widthproperty 
protected var _width:Number = 0
widthproperty 
width:Number  [read-write]Implementation
    public function get width():Number
    public function set width(value:Number):void
Constructor detail
Actor()constructor
public function Actor(insxml:XML = null)Parameters
insxml:XML (default = null)
Method detail
applyForce()method
public function applyForce(fx:Number, fy:Number):voidParameters
fx:Number
 
fy:Number
doesHit()method 
public function doesHit(x:Number, y:Number, source:Object):CollisionParameters
x:Number
 
y:Number
 
source:Object

Returns
Collision
fromBytes()method 
public override function fromBytes(bytes:ByteArray):voidParameters
bytes:ByteArray
getBounds()method 
public override function getBounds():Rect

Returns
Rect
isAlive()method 
public override function isAlive():Boolean

Returns
Boolean
isAttached()method 
public function isAttached():Boolean

Returns
Boolean
isOrientShootDown()method 
public function isOrientShootDown():Boolean

Returns
Boolean
isOrientShootUp()method 
public function isOrientShootUp():Boolean

Returns
Boolean
orientBody()method 
public function orientBody(body:int):voidParameters
body:int
orientShoot()method 
public function orientShoot(shoot:int):voidParameters
shoot:int
setAttached()method 
public function setAttached(ld:LineData, id:int = -1):voidParameters
ld:LineData
 
id:int (default = -1)
shouldSpawn()method 
public override function shouldSpawn():Boolean

Returns
Boolean
toBytes()method 
public override function toBytes(bytes:ByteArray = null):ByteArrayParameters
bytes:ByteArray (default = null)

Returns
ByteArray
toString()method 
public function toString():String

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

Returns
XML
Constant detail
ACT_COUNTconstant
public static const ACT_COUNT:int = 9
HIT_BACKconstant 
public static const HIT_BACK:int
HIT_BIGconstant 
public static const HIT_BIG:int
HIT_FRONTconstant 
public static const HIT_FRONT:int = 1
ORIENT_LEFTconstant 
public static const ORIENT_LEFT:int = 0
ORIENT_RIGHTconstant 
public static const ORIENT_RIGHT:int = 1
ORIENT_SHOOT_Bconstant 
public static const ORIENT_SHOOT_B:int
ORIENT_SHOOT_Dconstant 
public static const ORIENT_SHOOT_D:int
ORIENT_SHOOT_Fconstant 
public static const ORIENT_SHOOT_F:int
ORIENT_SHOOT_MASKconstant 
public static const ORIENT_SHOOT_MASK:int
ORIENT_SHOOT_Uconstant 
public static const ORIENT_SHOOT_U:int
ORIENT_TURNINGconstant 
public static const ORIENT_TURNING:int
U_ACCELconstant 
public static const U_ACCEL:int
U_ATTACHconstant 
public static const U_ATTACH:int
U_HEALTHconstant 
public static const U_HEALTH:int
U_HITconstant 
public static const U_HIT:int
U_ORIENTconstant 
public static const U_ORIENT:int
U_SHOOTconstant 
public static const U_SHOOT:int
U_UPGRADEconstant 
public static const U_UPGRADE:int