Drag[en]gine Script Module DragonScript Script API  1.0
TriggerShout Class Reference

Trigger shouting message to console if fired. More...

Inheritance diagram for TriggerShout:
Trigger Element

Public Member Functions

void fire ()
 Shout message to console. More...
 
String getMessage ()
 Message to shout to console. More...
 
void init (StubElement stub)
 Initialize element from stub. More...
 
TriggerShout new (TriggerShoutClass eclass)
 Create trigger. More...
 
void visit (ElementVisitor visitor)
 Visit element. More...
 
- Public Member Functions inherited from Trigger
void addToGameWorld ()
 Add to game world. More...
 
void dispose ()
 Dispose of element. More...
 
void fire ()
 Fire trigger. More...
 
void fullReset ()
 Fully reset trigger. More...
 
bool getFired ()
 Trigger is in the fired state. More...
 
bool getHasFired ()
 Trigger has been fired at least once so far. More...
 
StringID getName ()
 Trigger name. More...
 
TSTriggerTable getTable ()
 Trigger table to add trigger to or null if not set. More...
 
TSTriggerTarget getTarget ()
 Trigger target or null if not set. More...
 
void init (StubElement stub)
 Initialize element from stub. More...
 
Trigger new (ElementClass eclass)
 Create trigger. More...
 
void removeFromGameWorld ()
 Remove from game world. More...
 
void reset ()
 Reset trigger. More...
 
void setFired (bool fired)
 Set if trigger is in the fired state. More...
 
void setHasFired (bool hasFired)
 Set if trigger has been fired at least once so far. More...
 
void visit (ElementVisitor visitor)
 Visit trigger. More...
 
- Public Member Functions inherited from Element
void addToGameWorld ()
 
void dispose ()
 
void enterFrame ()
 Frame update started. More...
 
ElementClass getClass ()
 
DMatrix getElementMatrix ()
 Matrix to transform from element space into world space. More...
 
GameWorld getGameWorld ()
 
UniqueID getID ()
 
DMatrix getInverseElementMatrix ()
 Matrix to transform from world space into element space. More...
 
Quaternion getOrientation ()
 
Element getParent ()
 
DVector getPosition ()
 
StubElement getStub ()
 Element stub used to create the element. More...
 
bool getTouchable ()
 
bool getVisible ()
 
void init (StubElement stub)
 Initialize element from stub. More...
 
bool isChildOf (Element parent)
 
bool isMyselfOrChildOf (Element parent)
 
Element new (ElementClass elementClass)
 
void onSetGameWorld ()
 
void onSetGeometry ()
 
void onSetOrientation ()
 
void onSetParent ()
 
void onSetPosition ()
 
void onSetTouchable ()
 
void onSetVisible ()
 
void postThink (float elapsed)
 
void readFromFile (PersistencyEnvironment env, FileReader reader)
 Read element from file reader. More...
 
void removeFromGameWorld ()
 
void removeFromGameWorldIfPresent ()
 Remove element from game world if present. More...
 
void setGameWorld (GameWorld gameWorld)
 
void setGeometry (DVector position, Quaternion orientation)
 
void setID (UniqueID id)
 
void setOrientation (Quaternion orientation)
 
void setParent (Element parent)
 
void setPosition (DVector position)
 
void setStub (StubElement stub)
 Set element stub used to create the element. More...
 
void setTouchable (bool touchable)
 
void setVisible (bool visible)
 
void think (float elapsed)
 
String toString ()
 
void visit (ElementVisitor visitor)
 
void writeToFile (PersistencyEnvironment env, FileWriter writer)
 Write element to file writer. More...
 
void writeToFileWithStub (PersistencyEnvironment env, FileWriter writer)
 Write element to file writer with stub. More...
 

Protected Member Functions

void setMessage (String message)
 Set message to shout to console. More...
 
- Protected Member Functions inherited from Trigger
void addToTable ()
 Add trigger to table if table is present and name is not empty. More...
 
void setName (StringID name)
 Set trigger name. More...
 
void setTable (TSTriggerTable table)
 Trigger table to add trigger to or null if not set. More...
 
void setTarget (TSTriggerTarget target)
 Set trigger target or null if not set. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Element
static Element readElementFromFileWithStub (PersistencyEnvironment env, FileReader reader, ElementClassList ElementClassList)
 Load element from file reader with stub supporting null element. More...
 
static void writeElementToFileWithStub (PersistencyEnvironment env, FileWriter writer, Element element)
 Write element to file writer with stub supporting null element. More...
 

Detailed Description

Trigger shouting message to console if fired.

Trigger class does not provide read/write file support. If subclass needs changing message or other parameters dynamically it has to overwrite readFromFile() and riteToFile() to restore the proper state.

Trigger element supports these stub properties:

Property Value
message Message to shout to console

Member Function Documentation

◆ fire()

void fire ( )

Shout message to console.

◆ getMessage()

String getMessage ( )

Message to shout to console.

◆ init()

void init ( StubElement  stub)

Initialize element from stub.

◆ new()

Create trigger.

◆ setMessage()

void setMessage ( String  message)
protected

Set message to shout to console.

◆ visit()

void visit ( ElementVisitor  visitor)

Visit element.


The documentation for this class was generated from the following file: