- Timestamp:
- Jun 6, 2008, 12:03:56 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/script_trigger/src/orxonox/objects/Trigger.h
r1541 r1550 37 37 #include "core/BaseObject.h" 38 38 #include "core/ClassTreeMask.h" 39 #include "../tools/BillboardSet.h" 39 40 40 41 namespace orxonox { … … 54 55 public: 55 56 Trigger(); 57 Trigger(bool active) { bActive_ = active; } 56 58 ~Trigger(); 57 59 … … 60 62 void addTrigger(Trigger* trig); 61 63 void addTargets(std::string targets); 64 void removeTargets(std::string targets); 65 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 62 66 inline TriggerMode getMode() { return mode_; } 63 67 inline void setMode(TriggerMode mode) { this->mode_ = mode; } 64 inline void tick(float dt) { this->actualTime_ += dt; } 68 inline void tick(float dt) { if(bActive_) this->actualTime_ += dt; } 69 inline void reset(float time) { this->actualTime_ = 0; this->triggingTime_ = time; } 70 inline void reset() { reset(triggingTime_); } 65 71 66 72 private: … … 71 77 72 78 private: 73 std::set<Trigger*> triggers_;79 std::set<Trigger*> subTriggers_; 74 80 TriggerMode mode_; 75 81 float triggingTime_; 76 82 float actualTime_; 77 83 float radius_; 84 bool bActive_; 78 85 ClassTreeMask targetMask_; 86 BillboardSet debugBillboard_; 79 87 }; 80 88
Note: See TracChangeset
for help on using the changeset viewer.