Changeset 7456 for code/trunk/src/modules/questsystem/Quest.h
- Timestamp:
- Sep 15, 2010, 7:29:16 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/questsystem/Quest.h
r7163 r7456 28 28 29 29 /** 30 @file 30 @file Quest.h 31 31 @brief Definition of the Quest class. 32 The Quest is the parent class of LocalQuest and GlobalQuest. 32 The Quest class is the parent class of @ref orxonox::LocalQuest "LocalQuest" and @ref orxonox::GlobalQuest "GlobalQuest". 33 @ingroup Questsystem 33 34 */ 34 35 … … 45 46 namespace QuestStatus 46 47 { 47 //! Different states of a Quest.48 //! Different states of a @ref orxonox::Quest "Quest". 48 49 enum Value 49 50 { … … 57 58 /** 58 59 @brief 59 Represents a Quest in the game. 60 A Quest has a list of subquests and a parentquest (if it is not a rootquest). 60 Represents a Quest in the game. A Quest is a task that the player can (or has to) fulfill upon which he will (possibly) receive some kind of reward. 61 62 A Quest can have a list of sub-quests and has a parent-quest (if it is not a root-quest). 61 63 Each Quest exists only once but it has a different status (inactive, active, failed or completed) for each player. 62 A Quest has several hints (QuestHint) that can be unlocked through QuestEffectsand then display aid in solving the Quest.63 A Quest has a list of QuestEffects that are invoked when the quest is failed and also a list of QuestEffectsthat are invoked, when the Quest is completed.64 A Quest can have several hints (QuestHint) that can be unlocked through @ref orxonox::QuestEffect "QuestEffects" and then display aid in solving the Quest. 65 A Quest can have a list of @ref orxonox::QuestEffect "QuestEffects" that are invoked when the quest is failed and also a list of @ref orxonox::QuestEffect "QuestEffects" that are invoked, when the Quest is completed. 64 66 65 Quest itself should not be instantiated, if you want to create a quest either go forLocalQuest or GlobalQuest, whichever suits you needs better.67 Quest itself should not be instantiated, if you want to create a quest either use LocalQuest or GlobalQuest, whichever suits you needs better. 66 68 @author 67 69 Damian 'Mozork' Frick … … 77 79 78 80 /** 79 @brief Returns the parent quest of the Quest.80 @return Returns a pointer to the parent quest of the Quest.81 @brief Returns the parent-quest of the Quest. 82 @return Returns a pointer to the parent-quest of the Quest. 81 83 */ 82 84 inline Quest* getParentQuest(void) const … … 84 86 85 87 /** 86 @brief Returns the list of sub quests.87 @return Returns a reference to the list of sub quests of the quest.88 @brief Returns the list of sub-quests. 89 @return Returns a reference to the list of sub-quests of the quest. 88 90 */ 89 91 inline const std::list<Quest*> & getSubQuestList(void) const … … 113 115 virtual bool isCompletable(const PlayerInfo* player) const = 0; //!< Checks whether the Quest can be completed. 114 116 115 const Quest* getSubQuest(unsigned int index) const; //!<Returns the sub quest at the given index.117 const Quest* getSubQuest(unsigned int index) const; //!<Returns the sub-quest at the given index. 116 118 const QuestHint* getHint(unsigned int index) const; //!< Returns the QuestHint at the given index. 117 119 const QuestEffect* getFailEffect(unsigned int index) const; //!< Returns the fail QuestEffect at the given index. … … 136 138 137 139 private: 138 Quest* parentQuest_; //!< Pointer to the parent quest.139 std::list<Quest*> subQuests_; //!< List of all the sub quests.140 Quest* parentQuest_; //!< Pointer to the parent-quest. 141 std::list<Quest*> subQuests_; //!< List of all the sub-quests. 140 142 141 143 std::list<QuestHint*> hints_; //!< A list of all the QuestHints tied to this Quest. … … 146 148 std::list<QuestListener*> listeners_; //!< A list of QuestListeners, that listen to what exactly happens with this Quest. 147 149 148 bool setParentQuest(Quest* quest); //!< Sets the parent quest of the Quest.149 bool addSubQuest(Quest* quest); //!< Adds a sub quest to the Quest.150 bool setParentQuest(Quest* quest); //!< Sets the parent-quest of the Quest. 151 bool addSubQuest(Quest* quest); //!< Adds a sub-quest to the Quest. 150 152 bool addHint(QuestHint* hint); //!< Add a QuestHint to the list of QuestHints. 151 153 bool addFailEffect(QuestEffect* effect); //!< Adds an QuestEffect to the list of fail QuestEffects.
Note: See TracChangeset
for help on using the changeset viewer.