Drag[en]gine Script Module DragonScript Script API  1.0
TriggerCounter Class Reference
Inheritance diagram for TriggerCounter:
TriggerTarget Trigger Element

Public Member Functions

void fire ()
int getFiredCount ()
int getNeededFiredCount ()
void init (StubElement stub)
TriggerCounter new (TriggerCounterClass eclass)
void readFromFile (FileReader reader)
void setFiredCount (int count)
void setNeededFiredCount (int count)
void visit (ElementVisitor visitor)
void writeToFile (FileWriter writer)
- Public Member Functions inherited from TriggerTarget
void fire ()
String getTarget ()
void init (StubElement stub)
TriggerTarget new (ElementClass eclass)
void readFromFile (FileReader reader)
void setTarget (String target)
void visit (ElementVisitor visitor)
void writeToFile (FileWriter writer)
- Public Member Functions inherited from Trigger
void fire ()
 Fire trigger. More...
void fullReset ()
 Full reset trigger. More...
bool getFired ()
bool getHasFired ()
StringID getName ()
void init (StubElement stub)
Trigger new (ElementClass eclass)
void readFromFile (FileReader reader)
void reset ()
 Reset trigger. More...
void setFired (bool fired)
void setHasFired (bool hasFired)
void setName (StringID name)
void visit (ElementVisitor visitor)
void writeToFile (FileWriter writer)
- 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 ()
bool getTouchable ()
bool getVisible ()
void init (StubElement stub)
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 (FileReader reader)
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 setTouchable (bool touchable)
void setVisible (bool visible)
void think (float elapsed)
String toString ()
void visit (ElementVisitor visitor)
void writeToFile (FileWriter writer)

Detailed Description

Trigger that fires the assigned target trigger once after it has been fired itself a certain number of times.

Roland Pl├╝ss

Member Function Documentation

◆ fire()

void fire ( )

Increases the fired counter by one. If the counter equals the needed count it fires the target trigger once.

◆ getFiredCount()

int getFiredCount ( )

Retrieves the count of times the trigger has been fired yet.

◆ getNeededFiredCount()

int getNeededFiredCount ( )

Retrieves the count of times this trigger has to be fired before it fires the target trigger.

◆ init()

void init ( StubElement  stub)

Initialize the element from a stub.

◆ new()

Creates a new TriggerCounter object.

◆ readFromFile()

void readFromFile ( FileReader  reader)

Reads the element from a file writer.

◆ setFiredCount()

void setFiredCount ( int  count)

Sets the count of times this trigger has been fired.

◆ setNeededFiredCount()

void setNeededFiredCount ( int  count)

Sets the count of time this trigger has to be fired before he fired the target trigger.

◆ visit()

void visit ( ElementVisitor  visitor)

Visit this trigger.

◆ writeToFile()

void writeToFile ( FileWriter  writer)

Writes the element to a file writer.

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