Packageorg.wak.action.actions
Interfacepublic interface IAction
ImplementorsBaseAction

Action interface



Public Properties
 PropertyDefined by
  isReady : Boolean
[read-only] Returns true if the action has all the scene or inventory item needed as parameters for the action.
IAction
  paramsNumber : int
[read-only] The number of parameters used by the action.
IAction
Public Methods
 MethodDefined by
  
Add an IInteractable as action parameter.
IAction
  
CanExecute(pIterator:IIterator):Boolean
Tests if the action can execute.
IAction
  
Execute(pIterator:IIterator):Boolean
Executes the action.
IAction
  
GetId():String
The action identificator.
IAction
  
GetNoActionText():String
If no method found for the action, you usually gets a generic message this method returns that message.
IAction
  
The first parameter of the action.
IAction
  
The second parameter of the action.
IAction
  
GetText():String
Get the action localized text for player's interface uses.
IAction
  
Test if the IInteractable is aceptable as action parameter
IAction
Property detail
isReadyproperty
isReady:Boolean  [read-only]

Returns true if the action has all the scene or inventory item needed as parameters for the action.

Implementation
    public function get isReady():Boolean
paramsNumberproperty 
paramsNumber:int  [read-only]

The number of parameters used by the action. Usually 1 or 2.

Implementation
    public function get paramsNumber():int
Method detail
AddParameter()method
public function AddParameter(pItem:IInteractable):void

Add an IInteractable as action parameter.

Parameters
pItem:IInteractable — an scene item.
CanExecute()method 
public function CanExecute(pIterator:IIterator):Boolean

Tests if the action can execute.

Parameters
pIterator:IIterator — iterator of Puzzles Controller.

Returns
Boolean — true if the action found a method for the execution.
Execute()method 
public function Execute(pIterator:IIterator):Boolean

Executes the action.

Parameters
pIterator:IIterator — iterator of Puzzles Controller.

Returns
Boolean — true if the action found a method for the execution.
GetId()method 
public function GetId():String

The action identificator.

Returns
String
GetNoActionText()method 
public function GetNoActionText():String

If no method found for the action, you usually gets a generic message this method returns that message.

Returns
String — No action message for this action.
GetParam1()method 
public function GetParam1():IInteractable

The first parameter of the action.

Returns
IInteractable — IInteractable parameter.
GetParam2()method 
public function GetParam2():IInteractable

The second parameter of the action.

Returns
IInteractable — IInteractable parameter.
GetText()method 
public function GetText():String

Get the action localized text for player's interface uses.

Returns
String
TestParameter()method 
public function TestParameter(pItem:IInteractable):Boolean

Test if the IInteractable is aceptable as action parameter

Parameters
pItem:IInteractable — true if the action accept the pItem as parameter.

Returns
Boolean