Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2905


Ignore:
Timestamp:
Apr 6, 2009, 5:25:22 PM (16 years ago)
Author:
Aurelian
Message:

My first version with working triggers in a row…

Location:
code/branches/gametypes/src/orxonox/objects
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gametypes/src/orxonox/objects/worldentities/triggers/Trigger.cc

    r2826 r2905  
    102102    {
    103103      this->bFirstTick_ = false;
    104       this->fireEvent(false);
     104      this->triggered(false);
    105105    }
    106106
     
    144144      this->bTriggered_ = (newState & 0x1);
    145145      this->bActive_ = newState & 2;
    146       this->fireEvent(this->bActive_);
     146      this->triggered(this->bActive_);
    147147      this->stateChanges_.pop();
    148148      if (this->stateChanges_.size() != 0)
     
    160160    else
    161161      this->setBillboardColour(ColourValue(1.0, 0.0, 0.0));
     162  }
     163
     164  void Trigger::triggered(bool bIsTriggered)
     165  {
     166    this->fireEvent(bIsTriggered);
    162167  }
    163168
  • code/branches/gametypes/src/orxonox/objects/worldentities/triggers/Trigger.h

    r2826 r2905  
    101101      inline bool isTriggered() { return this->isTriggered(this->mode_); }
    102102      virtual bool isTriggered(TriggerMode mode);
     103      virtual void triggered(bool bIsTriggered);
    103104
    104105    private:
Note: See TracChangeset for help on using the changeset viewer.