- Timestamp:
- Nov 23, 2008, 4:31:36 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem2/src/orxonox/objects/quest/QuestEffectBeacon.h
r2226 r2251 30 30 @file QuestEffectBeacon.h 31 31 @brief 32 32 Definition of the QuestEffectBeacon class. 33 33 */ 34 34 … … 61 61 A QuestEffectBeacon can be inactive or active. 62 62 63 64 65 63 Creating a QuestEffectBeacon through XML goes as follows: 64 65 <QuestEffectBeacon times=n> //Where 'n' is eighter a number >= 0, which means the QuestEffectBeacon can be executed n times. Or n = -1, which means the QuestEffectBeacon can be executed an infinite number of times. 66 66 <effects> 67 67 <QuestEffect /> //A list of QuestEffects, invoked when the QuestEffectBeacon is executed, see QuestEffect for the full XML representation. … … 70 70 </effects> 71 71 <events> 72 73 74 75 76 77 78 79 72 <execute> 73 <EventListener event=eventIdString /> 74 </execute> 75 </events> 76 <attached> 77 <PlayerTrigger name=eventIdString /> //A PlayerTrigger triggering the execution of the QuestEffectBeacon. 78 </attached> 79 </QuestEffectBeacon> 80 80 @author 81 81 Damian 'Mozork' Frick … … 83 83 class _OrxonoxExport QuestEffectBeacon : public PositionableEntity 84 84 { 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 85 public: 86 QuestEffectBeacon(BaseObject* creator); 87 virtual ~QuestEffectBeacon(); 88 89 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestEffectBeacon object through XML. 90 91 virtual void processEvent(Event& event); //!< Processes an event for this QuestEffectBeacon. 92 93 bool execute(bool b, PlayerTrigger* trigger); //!< Executes the QuestEffects of the QuestEffectBeacon. 94 95 /** 96 @brief Tests whether the QuestEffectBeacon is active. 97 @return Returns true if the QuestEffectBeacon is active, fals if not. 98 */ 99 inline bool isActive(void) 100 { return this->status_ == QuestEffectBeaconStatus::active; } 101 102 bool setActive(bool activate); //!< Set the status of the QuestEffectBeacon. 103 104 protected: 105 105 bool decrementTimes(void); //!< Decrement the number of times the QuestEffectBeacon can still be executed. 106 106
Note: See TracChangeset
for help on using the changeset viewer.