Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 6, 2008, 12:03:56 AM (16 years ago)
Author:
bknecht
Message:

Trigger is now represented by a flare when Debug is on also XML support is enabled (not tested yet though)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/script_trigger/src/orxonox/objects/Trigger.h

    r1541 r1550  
    3737#include "core/BaseObject.h"
    3838#include "core/ClassTreeMask.h"
     39#include "../tools/BillboardSet.h"
    3940
    4041namespace orxonox {
     
    5455    public:
    5556      Trigger();
     57      Trigger(bool active) { bActive_ = active; }
    5658      ~Trigger();
    5759
     
    6062      void addTrigger(Trigger* trig);
    6163      void addTargets(std::string targets);
     64      void removeTargets(std::string targets);
     65      virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    6266      inline TriggerMode getMode() { return mode_; }
    6367      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_); }
    6571
    6672    private:
     
    7177
    7278    private:
    73       std::set<Trigger*> triggers_;
     79      std::set<Trigger*> subTriggers_;
    7480      TriggerMode mode_;
    7581      float triggingTime_;
    7682      float actualTime_;
    7783      float radius_;
     84      bool bActive_;
    7885      ClassTreeMask targetMask_;
     86      BillboardSet debugBillboard_;
    7987  };
    8088
Note: See TracChangeset for help on using the changeset viewer.