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

Classes

class  TriggerByElement
 

Public Member Functions

void addToGameWorld ()
 
bool canHitCollider (Collider owner, Collider collider)
 
void colliderChanged (Collider owner)
 
void collisionResponse (Collider owner, CollisionInfo info)
 
void dispose ()
 
void fireByElement (Element element)
 
bool getCanFireMultipleTimes ()
 
Collider getCollider ()
 
void init (StubElement stub)
 
TriggerArea new (TriggerAreaClass eclass)
 
void onSetGeometry ()
 
void onSetOrientation ()
 
void onSetPosition ()
 
void onSetTouchable ()
 
void readFromFile (FileReader reader)
 
void removeFromGameWorld ()
 
void reset ()
 
void setCanFireMultipleTimes (bool multiple)
 
void setCollider (Collider collider)
 
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 ()
 
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 postLoadInit ()
 
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)
 
Notifications.

Detailed Description

Trigger that fires target triggers everytime another object penetrates the area of the trigger.

Author
Roland Pl├╝ss
Version
1.0

Member Function Documentation

§ addToGameWorld()

void addToGameWorld ( )

Adds the element to the game world.

§ canHitCollider()

bool canHitCollider ( Collider  owner,
Collider  collider 
)

Determines if the owner can hit the collider.

Implements ColliderListener.

§ colliderChanged()

void colliderChanged ( Collider  owner)

Notifies that the collider changed and that the element has to be updated. Can be called more than once per frame.

Implements ColliderListener.

§ collisionResponse()

void collisionResponse ( Collider  owner,
CollisionInfo  info 
)

Collision detected. The default implementation fires the trigger if not done already.

Implements ColliderListener.

§ dispose()

void dispose ( )

Disposes of the element.

§ fireByElement()

void fireByElement ( Element  element)

Fire the trigger due to element hitting us.

§ getCanFireMultipleTimes()

bool getCanFireMultipleTimes ( )

Determines if the trigger can be fired multiple times.

§ getCollider()

Collider getCollider ( )

Retrieve the collider set for this trigger.

§ init()

void init ( StubElement  stub)

Initialize the element from a stub.

§ new()

TriggerArea new ( TriggerAreaClass  eclass)

Creates a new TriggerArea object.

§ onSetGeometry()

void onSetGeometry ( )

Position and orientation changed.

§ onSetOrientation()

void onSetOrientation ( )

Orientation changed.

§ onSetPosition()

void onSetPosition ( )

Position changed.

§ onSetTouchable()

void onSetTouchable ( )

Touchable state changed.

§ readFromFile()

void readFromFile ( FileReader  reader)

Reads the element from a file writer.

§ removeFromGameWorld()

void removeFromGameWorld ( )

Removes the element from the game world if one is set. Does not dispose of the element.

§ reset()

void reset ( )

Resets the trigger.

§ setCanFireMultipleTimes()

void setCanFireMultipleTimes ( bool  multiple)

Choses if the trigger can fire multiple times.

§ setCollider()

void setCollider ( Collider  collider)

Set collider for this 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: