35 #ifndef _TriggerBase_H__    36 #define _TriggerBase_H__    90                 { 
if(delay > 0.0f) this->delay_= 
delay; this->delayChanged(); }
    96                 { 
return this->delay_; }
   104                 { this->bSwitch_ = bSwitch; }
   110                 { 
return this->bSwitch_; }
   117                 { this->bStayActive_ = bStayActive; }
   123                 { 
return this->bStayActive_; }
   130                 { 
return this->remainingActivations_; }
   136                 { 
return this->remainingActivations_ > 0 || this->remainingActivations_ == INF_s; }
   143                 { this->bInvertMode_ = bInvert; }
   149                 { 
return this->bInvertMode_; }
   157                 { this->mode_ = mode; }
   167             const TriggerBase* getTrigger(
unsigned int index) 
const;
   174                 { 
return this->bMultiTrigger_; }
   188                 { 
if(activations >= 0 || activations == INF_s) this->remainingActivations_ = activations; }
   191                 { 
return this->remainingActivations_ == INF_s || this->remainingActivations_  > 0; }
   198                 { this->parent_ = parent; }
 #define _ObjectsExport
Definition: ObjectsPrereqs.h:60
 
static const int INF_s
Magic number for infinity. 
Definition: TriggerBase.h:177
 
bool bStayActive_
Bool for the stay-active-mode, if true the trigger stays active after its last activation.;. 
Definition: TriggerBase.h:204
 
The StaticEntity is the simplest derivative of the orxonox::WorldEntity class. 
Definition: StaticEntity.h:50
 
bool hasRemainingActivations(void) const 
Check whether the trigger has still at least one remaining activation. 
Definition: TriggerBase.h:135
 
TriggerMode
The different modes the trigger can be in. 
Definition: TriggerBase.h:54
 
static const std::string xor_s
Definition: TriggerBase.h:181
 
Declaration of the Tickable interface. 
 
::std::string string
Definition: gtest-port.h:756
 
TriggerMode mode_
The mode of the trigger. 
Definition: TriggerBase.h:209
 
bool getInvert(void) const 
Get the invert-mode of the trigger. 
Definition: TriggerBase.h:148
 
virtual void delayChanged(void)
Definition: TriggerBase.h:97
 
void addParentTrigger(TriggerBase *parent)
Adds the parent of a MultiTrigger. 
Definition: TriggerBase.h:197
 
bool hasRemainingActivations(void)
Definition: TriggerBase.h:190
 
bool bFirstTick_
Bool to check whether this is the first tick. 
Definition: TriggerBase.h:200
 
bool bMultiTrigger_
Specifies whether this trigger is a MultiTrigger. 
Definition: TriggerBase.h:214
 
virtual bool isActive(void) const 
Check whether the trigger is active. 
Definition: TriggerBase.h:82
 
float getDelay(void) const 
Get the delay of the trigger. 
Definition: TriggerBase.h:95
 
xmlelement
Definition: Super.h:519
 
The TriggerBase class is a base class for the two types of triggers, the (normal) Triggers and the Mu...
Definition: TriggerBase.h:70
 
void setSwitch(bool bSwitch)
Set switch-mode of the trigger. 
Definition: TriggerBase.h:103
 
static const std::string or_s
Definition: TriggerBase.h:180
 
void setStayActive(bool bStayActive)
Set the stay-active-mode of the trigger. 
Definition: TriggerBase.h:116
 
int getActivations(void) const 
Get the number of remaining activations of the trigger. 
Definition: TriggerBase.h:129
 
bool getStayActive(void) const 
Get the stay-active-mode of the trigger. 
Definition: TriggerBase.h:122
 
TriggerMode getMode(void) const 
Get the mode of the trigger. 
Definition: TriggerBase.h:163
 
Die Wagnis Klasse hat die folgenden Aufgaben: 
Definition: ApplicationPaths.cc:66
 
bool isMultiTrigger(void)
Check whether this trigger is a MultiTrigger. 
Definition: TriggerBase.h:173
 
The and mode. The trigger can only trigger if all the children are active. 
 
Mode
Definition: CorePrereqs.h:102
 
bool getSwitch(void) const 
Get the switch-mode of the trigger. 
Definition: TriggerBase.h:109
 
The or mode. The trigger can only trigger if at least one child is active. 
 
void setDelay(float delay)
Set the delay of the trigger. 
Definition: TriggerBase.h:89
 
unsigned int delay(float delay, const std::string &command)
Console-command: Calls another console command after delay seconds (game time). 
Definition: Timer.cc:65
 
TriggerBase * parent_
The parent of this trigger. 
Definition: TriggerBase.h:211
 
Shared library macros, enums, constants and forward declarations for the objects module  ...
 
bool bSwitch_
Bool for the switch-mode, if true the trigger behaves like a switch. 
Definition: TriggerBase.h:203
 
void setMode(TriggerMode mode)
Set the mode of the trigger. 
Definition: TriggerBase.h:156
 
std::set< TriggerBase * > children_
The children of this trigger. 
Definition: TriggerBase.h:212
 
int remainingActivations_
The remaining activations of this trigger. 
Definition: TriggerBase.h:206
 
The xor mode. The trigger can only trigger if exactly one child is active. 
 
The Tickable interface provides a tick(dt) function, that gets called every frame. 
Definition: Tickable.h:52
 
bool bInvertMode_
Bool for the invert-mode, if true the trigger is inverted. 
Definition: TriggerBase.h:208
 
float delay_
The delay that is imposed on all new trigger events. 
Definition: TriggerBase.h:202
 
void setActivations(int activations)
Set the number of activations the trigger can go through. 
Definition: TriggerBase.h:187
 
void setInvert(bool bInvert)
Set the invert-mode of triggerhe trigger. 
Definition: TriggerBase.h:142