physis.core.triggers
Class Triggers
java.lang.Object
|
+--physis.core.triggers.Triggers
- public class Triggers
- extends java.lang.Object
This class represents the main container of the triggers. In each updates it checks whether there's a trigger to be executed.
After executing it can be removed if it's not periodical or with other words its next time is not in the future.
(It might have some mechanism to load triggers on the fly, because due performance considerations there can be some tricky triggers, which load other triggers.)
|
Constructor Summary |
Triggers()
The constructor loads the first trigger file. |
|
Method Summary |
private void |
addTrigger(Trigger trigger)
|
private void |
loadTriggers(java.lang.String filename)
|
void |
processActualTriggers(long update_count)
Checks the triggers in the container if they have the propper updatecount to activate. |
private void |
removeTrigger(int index)
Removes a trigger from the indexth position. |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
triggers
Trigger[] triggers
- The container array. We use this typed array because of performance considerations.
TRIGGER_FILE
public static final java.lang.String TRIGGER_FILE
Triggers
public Triggers()
- The constructor loads the first trigger file. The filename comes from the Configuration.
processActualTriggers
public void processActualTriggers(long update_count)
- Checks the triggers in the container if they have the propper updatecount to activate. This is
called in every update cycle.
addTrigger
private void addTrigger(Trigger trigger)
removeTrigger
private void removeTrigger(int index)
- Removes a trigger from the indexth position.
loadTriggers
private void loadTriggers(java.lang.String filename)