Packageorg.wak.character.display
Classpublic class AbstractCharacterDisplay
InheritanceAbstractCharacterDisplay Inheritance flash.display.Sprite
ImplementsISceneInteractable
SubclassesSingleBmpCharacterDisplay, TestPlayerDisplay

This class is the common interface for the graphical representation of a player in a Scene.



Public Properties
 PropertyDefined by
  baseline : int
[read-only]
AbstractCharacterDisplay
  currentBehaviour : String
[read-only] The current animation behaviour.
AbstractCharacterDisplay
  currentTile : IntPoint
[read-only]
AbstractCharacterDisplay
  defaultAction : String
[read-only]
AbstractCharacterDisplay
  deltaX : Number
[read-only] Returns the deltaX of the screen coordinates.
AbstractCharacterDisplay
  deltaY : Number
[read-only] Returns the deltaY of the screen coordinates.
AbstractCharacterDisplay
  description : String
[read-only]
AbstractCharacterDisplay
  dialogX : Number
[read-only]
AbstractCharacterDisplay
  dialogY : Number
[read-only]
AbstractCharacterDisplay
  displayObject : DisplayObject
[read-only]
AbstractCharacterDisplay
  enabled : Boolean
[read-only]
AbstractCharacterDisplay
  interactableId : String
[read-only]
AbstractCharacterDisplay
  interactionBehaviour : String
[read-only]
AbstractCharacterDisplay
  interactionName : String
[read-only]
AbstractCharacterDisplay
  interactionPointX : Number
[read-only]
AbstractCharacterDisplay
  interactionPointY : Number
[read-only]
AbstractCharacterDisplay
  isMoving : Boolean
[read-only] Getter to know if the player is moving through the scene.
AbstractCharacterDisplay
  moveSpeed : Number
AbstractCharacterDisplay
  perspectiveEnabled : Boolean
[read-only]
AbstractCharacterDisplay
  pfGoal : IntPoint
AbstractCharacterDisplay
  pfStart : IntPoint
AbstractCharacterDisplay
  portrait : MovieClip
[read-only] Portrait display object of this CharacterDisplay
AbstractCharacterDisplay
  sceneId : String
AbstractCharacterDisplay
  stageX : Number
[read-only]
AbstractCharacterDisplay
  stageY : Number
[read-only]
AbstractCharacterDisplay
  unitaryUse : Boolean
[read-only]
AbstractCharacterDisplay
  walkIndex : int
AbstractCharacterDisplay
  walkPoints : Array
AbstractCharacterDisplay
Protected Properties
 PropertyDefined by
  mCurrentTile : IntPoint
AbstractCharacterDisplay
  mDisplayId : String = ""
AbstractCharacterDisplay
  mEnabled : Boolean = true
AbstractCharacterDisplay
  mIsMoving : Boolean
AbstractCharacterDisplay
  mMoveSpeed : Number = 90
AbstractCharacterDisplay
  mMovingAngle : Number = 0
AbstractCharacterDisplay
  mMovingTilesAngle : Number = 0
AbstractCharacterDisplay
  mPortrait : MovieClip = null
AbstractCharacterDisplay
  mPrevTile : IntPoint
AbstractCharacterDisplay
  mUpdatePerspective : Boolean = true
AbstractCharacterDisplay
Public Methods
 MethodDefined by
  
Constructor
AbstractCharacterDisplay
  
Method to test if the param pTile is equal to the current tile where the player is.
AbstractCharacterDisplay
  
ResetPosition(pX:Number, pY:Number):void
AbstractCharacterDisplay
  
ResetTilePosition(pX:Number, pY:Number):void
AbstractCharacterDisplay
  
SetAnimBehaviour(pAnimBehaviour:String, pPlays:int = 1, pOnPlayed:Function = null):void
Set an animation behaviour and play it.
AbstractCharacterDisplay
  
SetCurrentTile(pX:int, pY:int):void
This method is called by the Scene containing this PlayerRenderer to set the current tile inside the background tile map.
AbstractCharacterDisplay
  
SetInteractionPoint(pX:Number, pY:Number):void
Method to set the interaction point for this Character display.
AbstractCharacterDisplay
  
AbstractCharacterDisplay
  
AbstractCharacterDisplay
  
StartWalk(pOnCompleteHandler:Function = null):void
AbstractCharacterDisplay
  
StopWalk():void
AbstractCharacterDisplay
  
Update(event:Event):void
Handler of the ENTER_FRAME event.
AbstractCharacterDisplay
  
AbstractCharacterDisplay
Protected Methods
 MethodDefined by
  
OnAddedToStage(event:Event):void
Handler of the ADDED_TO_STAGE event.
AbstractCharacterDisplay
  
OnRemovedFromStage(event:Event):void
Handler of the REMOVED_FROM_STAGE event.
AbstractCharacterDisplay
Property detail
baselineproperty
baseline:int  [read-only]Implementation
    public function get baseline():int
currentBehaviourproperty 
currentBehaviour:String  [read-only]

The current animation behaviour.

Implementation
    public function get currentBehaviour():String
currentTileproperty 
currentTile:IntPoint  [read-only]Implementation
    public function get currentTile():IntPoint
defaultActionproperty 
defaultAction:String  [read-only]Implementation
    public function get defaultAction():String
deltaXproperty 
deltaX:Number  [read-only]

Returns the deltaX of the screen coordinates.

Implementation
    public function get deltaX():Number
deltaYproperty 
deltaY:Number  [read-only]

Returns the deltaY of the screen coordinates.

Implementation
    public function get deltaY():Number
descriptionproperty 
description:String  [read-only]Implementation
    public function get description():String
dialogXproperty 
dialogX:Number  [read-only]Implementation
    public function get dialogX():Number
dialogYproperty 
dialogY:Number  [read-only]Implementation
    public function get dialogY():Number
displayObjectproperty 
displayObject:DisplayObject  [read-only]Implementation
    public function get displayObject():DisplayObject
enabledproperty 
enabled:Boolean  [read-only]Implementation
    public function get enabled():Boolean
interactableIdproperty 
interactableId:String  [read-only]Implementation
    public function get interactableId():String
interactionBehaviourproperty 
interactionBehaviour:String  [read-only]Implementation
    public function get interactionBehaviour():String
interactionNameproperty 
interactionName:String  [read-only]Implementation
    public function get interactionName():String
interactionPointXproperty 
interactionPointX:Number  [read-only]Implementation
    public function get interactionPointX():Number
interactionPointYproperty 
interactionPointY:Number  [read-only]Implementation
    public function get interactionPointY():Number
isMovingproperty 
isMoving:Boolean  [read-only]

Getter to know if the player is moving through the scene.

Implementation
    public function get isMoving():Boolean
mCurrentTileproperty 
protected var mCurrentTile:IntPoint
mDisplayIdproperty 
protected var mDisplayId:String = ""
mEnabledproperty 
protected var mEnabled:Boolean = true
mIsMovingproperty 
protected var mIsMoving:Boolean
mMoveSpeedproperty 
protected var mMoveSpeed:Number = 90
mMovingAngleproperty 
protected var mMovingAngle:Number = 0
mMovingTilesAngleproperty 
protected var mMovingTilesAngle:Number = 0
moveSpeedproperty 
moveSpeed:Number  [read-write]Implementation
    public function get moveSpeed():Number
    public function set moveSpeed(value:Number):void
mPortraitproperty 
protected var mPortrait:MovieClip = null
mPrevTileproperty 
protected var mPrevTile:IntPoint
mUpdatePerspectiveproperty 
protected var mUpdatePerspective:Boolean = true
perspectiveEnabledproperty 
perspectiveEnabled:Boolean  [read-only]Implementation
    public function get perspectiveEnabled():Boolean
pfGoalproperty 
pfGoal:IntPoint  [read-write]Implementation
    public function get pfGoal():IntPoint
    public function set pfGoal(value:IntPoint):void
pfStartproperty 
pfStart:IntPoint  [read-write]Implementation
    public function get pfStart():IntPoint
    public function set pfStart(value:IntPoint):void
portraitproperty 
portrait:MovieClip  [read-only]

Portrait display object of this CharacterDisplay

Implementation
    public function get portrait():MovieClip
sceneIdproperty 
sceneId:String  [read-write]Implementation
    public function get sceneId():String
    public function set sceneId(value:String):void
stageXproperty 
stageX:Number  [read-only]Implementation
    public function get stageX():Number
stageYproperty 
stageY:Number  [read-only]Implementation
    public function get stageY():Number
unitaryUseproperty 
unitaryUse:Boolean  [read-only]Implementation
    public function get unitaryUse():Boolean
walkIndexproperty 
walkIndex:int  [read-write]Implementation
    public function get walkIndex():int
    public function set walkIndex(value:int):void
walkPointsproperty 
walkPoints:Array  [read-write]Implementation
    public function get walkPoints():Array
    public function set walkPoints(value:Array):void
Constructor detail
AbstractCharacterDisplay()constructor
public function AbstractCharacterDisplay()

Constructor

Method detail
CurrentTileIsEqual()method
public function CurrentTileIsEqual(pTile:IntPoint):Boolean

Method to test if the param pTile is equal to the current tile where the player is.

Parameters
pTile:IntPoint — IntPoint with the coordinates of a tile.

Returns
Boolean — true if pTile is equal to the current tile of the player.
OnAddedToStage()method 
protected function OnAddedToStage(event:Event):void

Handler of the ADDED_TO_STAGE event.

Parameters
event:Event
OnRemovedFromStage()method 
protected function OnRemovedFromStage(event:Event):void

Handler of the REMOVED_FROM_STAGE event.

Parameters
event:Event
ResetPosition()method 
public function ResetPosition(pX:Number, pY:Number):voidParameters
pX:Number
 
pY:Number
ResetTilePosition()method 
public function ResetTilePosition(pX:Number, pY:Number):voidParameters
pX:Number
 
pY:Number
SetAnimBehaviour()method 
public function SetAnimBehaviour(pAnimBehaviour:String, pPlays:int = 1, pOnPlayed:Function = null):void

Set an animation behaviour and play it.

Parameters
pAnimBehaviour:String — the id of the anim behaviour.
 
pPlays:int (default = 1) — number of times to play the anim.
 
pOnPlayed:Function (default = null) — Callback function, called when the animation finished.
SetCurrentTile()method 
public function SetCurrentTile(pX:int, pY:int):void

This method is called by the Scene containing this PlayerRenderer to set the current tile inside the background tile map.

Parameters
pX:int — current horizontal coordinate of the tile where the player
 
pY:int — current vertical coordinate of the tile where the player
SetInteractionPoint()method 
public function SetInteractionPoint(pX:Number, pY:Number):void

Method to set the interaction point for this Character display.

Parameters
pX:Number — horizontal coordinate of the interaction point.
 
pY:Number — vertical coordinate of the interaction point.
SetInteractionPointBehaviour()method 
public function SetInteractionPointBehaviour(pB:String):voidParameters
pB:String
SetOwner()method 
public function SetOwner(pOwner:AdventureCharacter):voidParameters
pOwner:AdventureCharacter
StartWalk()method 
public function StartWalk(pOnCompleteHandler:Function = null):voidParameters
pOnCompleteHandler:Function (default = null)
StopWalk()method 
public function StopWalk():void
Update()method 
public function Update(event:Event):void

Handler of the ENTER_FRAME event. Main Loop of the AbstractPlayerRenderer.

Parameters
event:Event
WalkDestinationReached()method 
public function WalkDestinationReached():void