Packageorg.wak.dialog
Classpublic class Topic

This class is the atom of a conversation in the adventure.



Public Properties
 PropertyDefined by
  action : String
[read-only] Action of this topic.
Topic
  onlyOnce : Boolean
[read-only] True if this topic was intended to be played only once.
Topic
  played : Boolean
private
Topic
  say : Boolean
If say is true the character will repeat the text after the selection.
Topic
  target : String
[read-only] The target works as a parameter of the action assigned to the topic.
Topic
  topicId : String
[read-only] Id of the topic, the id is optional fo the topic.
Topic
  visible : Boolean
visibility flag for the topic on the dialog interface.
Topic
Public Methods
 MethodDefined by
  
Topic(pInput:XML)
Constructor
Topic
  
List of the Say items contained in the Topic
Topic
  
isPresent(pCharId:String):Boolean
Test if a character is present in the topic.
Topic
  
SayText(pCharId:String):String
Return the first found Say item for the given character id.
Topic
  
toString():String
Topic
Property detail
actionproperty
action:String  [read-only]

Action of this topic. An action could be: exit: finish the conversation. goto: jumps to another dialog menu. activate: activates another dialgo option previously disabled. action: calls a method in the puzzle managers.

Implementation
    public function get action():String
onlyOnceproperty 
onlyOnce:Boolean  [read-only]

True if this topic was intended to be played only once.

Implementation
    public function get onlyOnce():Boolean
playedproperty 
played:Boolean  [read-write]

private

Implementation
    public function get played():Boolean
    public function set played(value:Boolean):void
sayproperty 
say:Boolean  [read-write]

If say is true the character will repeat the text after the selection.

Implementation
    public function get say():Boolean
    public function set say(value:Boolean):void
targetproperty 
target:String  [read-only]

The target works as a parameter of the action assigned to the topic. if the action of the topic is goto, the destination dialog is stored in the target property.

Implementation
    public function get target():String
topicIdproperty 
topicId:String  [read-only]

Id of the topic, the id is optional fo the topic. I must be used when some scripting interaction is used with the topic.

Implementation
    public function get topicId():String
visibleproperty 
visible:Boolean  [read-write]

visibility flag for the topic on the dialog interface.

Implementation
    public function get visible():Boolean
    public function set visible(value:Boolean):void
Constructor detail
Topic()constructor
public function Topic(pInput:XML)

Constructor

Parameters
pInput:XML — input xml containing the topic.
Method detail
GetSayItems()method
public function GetSayItems():IIterator

List of the Say items contained in the Topic

Returns
IIterator — IIterator with SayItem s
isPresent()method 
public function isPresent(pCharId:String):Boolean

Test if a character is present in the topic.

Parameters
pCharId:String — character id to test.

Returns
Boolean — true if the character is present as speaker in the topic.
SayText()method 
public function SayText(pCharId:String):String

Return the first found Say item for the given character id.

Parameters
pCharId:String — character id.

Returns
String — Text to say for the character id in pCharId
toString()method 
public function toString():String

Returns
String