Changeset 10620 in orxonox.OLD for branches/scriptimprovements/src/world_entities/script_triggers/time_trigger.h
- Timestamp:
- Apr 5, 2007, 6:11:02 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/scriptimprovements/src/world_entities/script_triggers/time_trigger.h
r10607 r10620 1 /*! 2 * @file time_trigger.h 3 * triggers a script after a given time 4 */ 5 6 #ifndef _TIME_TRIGGER_H 7 #define _TIME_TRIGGER_H 8 9 #include <string> 10 11 #include "script.h" 12 #include "script_trigger.h" 13 14 class TimeTrigger : public ScriptTrigger 15 { 16 ObjectListDeclaration(TimeTrigger); 17 18 public: 19 TimeTrigger(const TiXmlElement* root = NULL); 20 ~TimeTrigger(); 21 22 void setDelay(float newDelay){this->currentTime = this->delay = newDelay;} 23 void start(){ this->isStopped = false; } 24 void stop(){ this->isStopped = true; } 25 void reset(){ this->currentTime = delay; } 26 27 /// DO WORK 28 virtual void tick(float timestep); 29 30 private: 31 float delay; 32 float currentTime; 33 bool isStopped; 34 35 }; 36 37 #endif
Note: See TracChangeset
for help on using the changeset viewer.