Changeset 2662 for code/trunk/src/orxonox/objects/quest/Quest.h
- Timestamp:
- Feb 14, 2009, 10:17:35 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/objects/quest/Quest.h
- Property svn:mergeinfo changed
r2261 r2662 28 28 29 29 /** 30 @file Quest.h 31 @brief 32 Definition of the Quest class. 33 34 The Quest is the parent class of LocalQuest and GlobalQuest. 30 @file 31 @brief Definition of the Quest class. 32 The Quest is the parent class of LocalQuest and GlobalQuest. 35 33 */ 36 34 … … 47 45 #include "QuestItem.h" 48 46 49 namespace questStatus47 namespace orxonox 50 48 { 49 namespace questStatus 50 { 51 51 52 //!Different states of a Quest.53 enum Enum54 {55 inactive,56 active,57 failed,58 completed59 };52 //!Different states of a Quest. 53 enum Enum 54 { 55 inactive, 56 active, 57 failed, 58 completed 59 }; 60 60 61 } 62 63 namespace orxonox { 61 } 64 62 65 63 /** … … 90 88 { return this->parentQuest_; } 91 89 92 /** 93 @brief Returns the list of subquests. 94 @return Returns a reference to the list of subquests of the quest. 95 */ 96 inline const std::list<Quest*> & getSubQuestList(void) const 97 { return this->subQuests_; } 98 99 /** 100 @brief Returns the list of all QuestHints of this Quest. 101 @return Returns a reference to the list of QuestHints of the Quest. 102 */ 103 inline const std::list<QuestHint*> & getHintsList(void) const 104 { return this->hints_; } 105 106 bool isInactive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'inactive'. 107 bool isActive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'active'. 108 bool isFailed(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'failed'. 109 bool isCompleted(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'completed'. 110 111 bool start(PlayerInfo* player); //!< Sets a Quest to active. 112 virtual bool fail(PlayerInfo* player) = 0; //!< Fails the Quest. 113 virtual bool complete(PlayerInfo* player) = 0; //!< Completes the Quest. 90 /** 91 @brief Returns the list of subquests. 92 @return Returns a reference to the list of subquests of the quest. 93 */ 94 inline const std::list<Quest*> & getSubQuestList(void) const 95 { return this->subQuests_; } 96 97 /** 98 @brief Returns the list of all QuestHints of this Quest. 99 @return Returns a reference to the list of QuestHints of the Quest. 100 */ 101 inline const std::list<QuestHint*> & getHintsList(void) const 102 { return this->hints_; } 103 104 bool isInactive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'inactive'. 105 bool isActive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'active'. 106 bool isFailed(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'failed'. 107 bool isCompleted(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'completed'. 108 109 bool start(PlayerInfo* player); //!< Sets a Quest to active. 110 virtual bool fail(PlayerInfo* player); //!< Fails the Quest. 111 virtual bool complete(PlayerInfo* player); //!< Completes the Quest. 112 113 bool addListener(QuestListener* listener); //!< Adds a QuestListener to the list of QuestListeners listening to this Quest. 114 114 115 115 protected: … … 131 131 { return this->failEffects_; } 132 132 133 134 135 136 137 133 /** 134 @brief Returns the list of complete QuestEffects. 135 @return Returns a reference to the list of complete QuestEffects. 136 */ 137 inline std::list<QuestEffect*> & getCompleteEffectList(void) 138 138 { return this->completeEffects_; } 139 139 … … 141 141 virtual bool setStatus(PlayerInfo* player, const questStatus::Enum & status) = 0; //!< Changes the status for a specific player. 142 142 143 private:143 private: 144 144 Quest* parentQuest_; //!< Pointer to the parentquest. 145 145 std::list<Quest*> subQuests_; //!< List of all the subquests. … … 149 149 std::list<QuestEffect*> failEffects_; //!< A list of all QuestEffects to be invoked, when the Quest has been failed. 150 150 std::list<QuestEffect*> completeEffects_; //!< A list of QuestEffects to be invoked, when the Quest has been completed. 151 152 std::list<QuestListener*> listeners_; //!< A list of QuestListeners, that listen to what exactly happens with this Quest. 151 153 152 154 bool setParentQuest(Quest* quest); //!< Sets the parentquest of the Quest.
Note: See TracChangeset
for help on using the changeset viewer.