Packagecom.whirled.contrib
Classpublic class RemoteEntity

A helper proxy for accessing properties of another entity in the room.


Example
 var remote :RemoteEntity = new RemoteEntity(_ctrl, someTargetId);
 if (remote.get("apples") < remote.get("oranges")) {
     trace("Giving a couple dozen apples to " + remote.getName());
     remote.call("bobForApples", 24);
 }
 



Protected Properties
 PropertyDefined by
  _ctrl : EntityControl
Your code's EntityControl.
RemoteEntity
  _entityId : String
The unique identifier of this entity, or null if referring to the self.
RemoteEntity
Public Methods
 MethodDefined by
  
RemoteEntity(ctrl:EntityControl, entityId:String = null)
RemoteEntity
  
call(key:String, ... args):*
Request a Function from the entity and call it.
RemoteEntity
  
get(key:String):Object
Request a property from the entity.
RemoteEntity
  
getDimensions():Array
RemoteEntity
  
getHotspot():Array
RemoteEntity
  
RemoteEntity
  
RemoteEntity
  
getMoveSpeed():Number
RemoteEntity
  
getName():String
RemoteEntity
  
getOrientation():Number
RemoteEntity
  
RemoteEntity
  
getType():String
RemoteEntity
Property detail
_ctrlproperty
protected var _ctrl:EntityControl

Your code's EntityControl.

_entityIdproperty 
protected var _entityId:String

The unique identifier of this entity, or null if referring to the self.

Constructor detail
RemoteEntity()constructor
public function RemoteEntity(ctrl:EntityControl, entityId:String = null)Parameters
ctrl:EntityControl
 
entityId:String (default = null)
Method detail
call()method
public function call(key:String, ... args):*

Request a Function from the entity and call it.

Parameters
key:String
 
... args

Returns
* — The result of the function call or undefined if the function is unavailable.
get()method 
public function get(key:String):Object

Request a property from the entity.

Parameters
key:String

Returns
Object
getDimensions()method 
public function getDimensions():Array

Returns
Array

See also

EntityControl.PROP_DIMENSIONS
getHotspot()method 
public function getHotspot():Array

Returns
Array

See also

EntityControl.PROP_HOTSPOT
getLogicalLocation()method 
public function getLogicalLocation():Array

Returns
Array

See also

EntityControl.PROP_LOCATION_LOGICAL
getMemberId()method 
public function getMemberId():int

Returns
int

See also

EntityControl.PROP_MEMBER_ID
getMoveSpeed()method 
public function getMoveSpeed():Number

Returns
Number

See also

EntityControl.PROP_MOVE_SPEED
getName()method 
public function getName():String

Returns
String

See also

EntityControl.PROP_NAME
getOrientation()method 
public function getOrientation():Number

Returns
Number

See also

EntityControl.PROP_ORIENTATION
getPixelLocation()method 
public function getPixelLocation():Array

Returns
Array

See also

EntityControl.PROP_LOCATION_PIXEL
getType()method 
public function getType():String

Returns
String

See also

EntityControl.PROP_TYPE