Drag[en]gine Script Module DragonScript  1.23
Dragengine.TriggerSystem.TSTriggerTarget Class Reference

Target in a trigger table. More...

Inheritance diagram for Dragengine.TriggerSystem.TSTriggerTarget:

Public Member Functions

void addListener (TSTriggerListener listener)
 Add listener. More...
 
void addListenerIfAbsent (TSTriggerListener listener)
 Add listener if absent. More...
 
void dispose ()
 Dispose of trigger target. More...
 
void fire ()
 Fire trigger. More...
 
void fullReset ()
 Fully reset trigger. More...
 
bool getFired ()
 Target is currently fired. More...
 
bool getHasFired ()
 Target has ever fired. More...
 
int getListenerCount ()
 Number of listeners. More...
 
StringID getName ()
 Name. More...
 
TSTriggerTarget new (StringID name)
 Create trigger target. More...
 
void notifyListeners ()
 Notify all listeners. More...
 
void removeListener (TSTriggerListener listener)
 Remove listener. More...
 
void removeListenerIfPresent (TSTriggerListener listener)
 Remove listener if present. More...
 
void reset ()
 Reset trigger. More...
 
void setFired (bool fired)
 Set if target is currently fired. More...
 
void setHasFired (bool hasFired)
 Set if target has ever fired. More...
 
void writeToFile (FileWriter writer)
 Write trigger target to file. More...
 

Public Attributes

bool pFired
 
bool pHasFired
 
Array pListeners
 
StringID pName
 

Detailed Description

Target in a trigger table.

Triggers can set or reset the target. Whenever the state of the target changes all listeners are notified. Elements using a trigger expression add themselves to all the targets they use in the trigger expression.

Member Function Documentation

◆ addListener()

void Dragengine.TriggerSystem.TSTriggerTarget.addListener ( TSTriggerListener  listener)

Add listener.

◆ addListenerIfAbsent()

void Dragengine.TriggerSystem.TSTriggerTarget.addListenerIfAbsent ( TSTriggerListener  listener)

Add listener if absent.

◆ dispose()

void Dragengine.TriggerSystem.TSTriggerTarget.dispose ( )

Dispose of trigger target.

◆ fire()

void Dragengine.TriggerSystem.TSTriggerTarget.fire ( )

Fire trigger.

◆ fullReset()

void Dragengine.TriggerSystem.TSTriggerTarget.fullReset ( )

Fully reset trigger.

◆ getFired()

bool Dragengine.TriggerSystem.TSTriggerTarget.getFired ( )

Target is currently fired.

◆ getHasFired()

bool Dragengine.TriggerSystem.TSTriggerTarget.getHasFired ( )

Target has ever fired.

◆ getListenerCount()

int Dragengine.TriggerSystem.TSTriggerTarget.getListenerCount ( )

Number of listeners.

◆ getName()

StringID Dragengine.TriggerSystem.TSTriggerTarget.getName ( )

Name.

◆ new()

TSTriggerTarget Dragengine.TriggerSystem.TSTriggerTarget.new ( StringID  name)

Create trigger target.

◆ notifyListeners()

void Dragengine.TriggerSystem.TSTriggerTarget.notifyListeners ( )

Notify all listeners.

◆ removeListener()

void Dragengine.TriggerSystem.TSTriggerTarget.removeListener ( TSTriggerListener  listener)

Remove listener.

◆ removeListenerIfPresent()

void Dragengine.TriggerSystem.TSTriggerTarget.removeListenerIfPresent ( TSTriggerListener  listener)

Remove listener if present.

◆ reset()

void Dragengine.TriggerSystem.TSTriggerTarget.reset ( )

Reset trigger.

◆ setFired()

void Dragengine.TriggerSystem.TSTriggerTarget.setFired ( bool  fired)

Set if target is currently fired.

◆ setHasFired()

void Dragengine.TriggerSystem.TSTriggerTarget.setHasFired ( bool  hasFired)

Set if target has ever fired.

◆ writeToFile()

void Dragengine.TriggerSystem.TSTriggerTarget.writeToFile ( FileWriter  writer)

Write trigger target to file.

Member Data Documentation

◆ pFired

bool Dragengine.TriggerSystem.TSTriggerTarget.pFired

◆ pHasFired

bool Dragengine.TriggerSystem.TSTriggerTarget.pHasFired

◆ pListeners

Array Dragengine.TriggerSystem.TSTriggerTarget.pListeners

◆ pName

StringID Dragengine.TriggerSystem.TSTriggerTarget.pName

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