Packageorg.wak.character
Classpublic class AdventureCharacter

Represents a character in the adventure.



Public Properties
 PropertyDefined by
  characterDisplay : AbstractCharacterDisplay
The character display representing this player.
AdventureCharacter
  characterId : String
[read-only] The character id.
AdventureCharacter
  description : String
[read-only]
AdventureCharacter
  interactionName : String
[read-only] The character's name.
AdventureCharacter
  inventory : Inventory
[read-only] The character's inventory.
AdventureCharacter
  perspectiveEnabled : Boolean
[read-only] Enable or disable the perspective scaling in the scene.
AdventureCharacter
  sceneId : String
The id of the Scene where this character is.
AdventureCharacter
  speechColor : uint
[read-only] The color of the text when this character speaks.
AdventureCharacter
Public Methods
 MethodDefined by
  
Constructor
AdventureCharacter
  
MoveTo(pSceneX:Number, pSceneY:Number, pOnCompleteFunc:Function = null):void
Moves the character to the coordinates over the scene.
AdventureCharacter
  
Say(pText:String, pOnComplete:Function = null):void
Makes the character speak.
AdventureCharacter
Property detail
characterDisplayproperty
characterDisplay:AbstractCharacterDisplay  [read-write]

The character display representing this player.

Implementation
    public function get characterDisplay():AbstractCharacterDisplay
    public function set characterDisplay(value:AbstractCharacterDisplay):void
characterIdproperty 
characterId:String  [read-only]

The character id.

Implementation
    public function get characterId():String
descriptionproperty 
description:String  [read-only]Implementation
    public function get description():String
interactionNameproperty 
interactionName:String  [read-only]

The character's name.

Implementation
    public function get interactionName():String
inventoryproperty 
inventory:Inventory  [read-only]

The character's inventory.

Implementation
    public function get inventory():Inventory
perspectiveEnabledproperty 
perspectiveEnabled:Boolean  [read-only]

Enable or disable the perspective scaling in the scene.

Implementation
    public function get perspectiveEnabled():Boolean
sceneIdproperty 
sceneId:String  [read-write]

The id of the Scene where this character is.

Implementation
    public function get sceneId():String
    public function set sceneId(value:String):void
speechColorproperty 
speechColor:uint  [read-only]

The color of the text when this character speaks.

Implementation
    public function get speechColor():uint
Constructor detail
AdventureCharacter()constructor
public function AdventureCharacter(pCharDef:ICharacterDefinition)

Constructor

Parameters
pCharDef:ICharacterDefinition — the data to define an adventure character.
Method detail
MoveTo()method
public function MoveTo(pSceneX:Number, pSceneY:Number, pOnCompleteFunc:Function = null):void

Moves the character to the coordinates over the scene. Usually walking through.

Parameters
pSceneX:Number — horizontal coordinate on the scene.
 
pSceneY:Number — vertical coordinate on the scene
 
pOnCompleteFunc:Function (default = null)
Say()method 
public function Say(pText:String, pOnComplete:Function = null):void

Makes the character speak.

Parameters
pText:String — Text to say
 
pOnComplete:Function (default = null) — function reference to call when the task is completed.