Changeset 2261 for code/trunk/src/orxonox/objects/quest/QuestHint.h
- Timestamp:
- Nov 25, 2008, 11:56:40 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/questsystem2 (added) merged: 2109,2146,2159,2191,2193-2196,2205-2206,2208-2209,2221,2226,2228,2251,2258
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/objects/quest/QuestHint.h
- Property svn:mergeinfo changed
/code/branches/questsystem2/src/orxonox/objects/quest/QuestHint.h (added) merged: 2146,2159,2191,2205,2251 /code/trunk/src/orxonox/objects/quest/QuestHint.h merged: 1925-2089
r2096 r2261 26 26 * 27 27 */ 28 29 /** 30 @file QuestHint.h 31 @brief 32 Definition of the QuestHint class. 33 */ 28 34 29 35 #ifndef _QuestHint_H__ … … 41 47 { 42 48 49 //! The status of the hint. 43 50 enum Enum 44 51 { … … 52 59 { 53 60 54 class Player; //Forward declaration, remove when fully integrated into the objecthirarchy.55 56 61 /** 57 62 @brief 58 63 Represents a hint in the game towards completing a Quest. 59 Consists of title and description in textual form and must belong to a quest. 60 A QuestHit has a defined status (inactive or active, where inactive is default) for each player, which means each QuestHint exists only once for all players, it doesn't belong to a player, it just has different stati for each of them. 64 Consists of title and description (which is stored in a QuestDescription object) in textual form and must belong to a quest. 65 A QuestHint has a defined status (inactive or active, where inactive is default) for each player, which means each a QuestHint exists only once for all players, it doesn't belong to a player, it just has different states for each of them. 66 67 Creating a QuestHint through XML goes as follows: 68 69 <QuestHint id="hintId"> //Where hintId is a GUID, see http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure for more information 70 <QuestDesctription title="" description="" /> 71 </QuestHint> 61 72 @author 62 73 Damian 'Mozork' Frick … … 69 80 virtual ~QuestHint(); 70 81 71 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 82 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestHint object through XML. 72 83 73 bool isActive( Player* player); //!< Returns true if the hint is active for the input player.84 bool isActive(const PlayerInfo* player) const; //!< Returns true if the QuestHint is active for the input player. 74 85 75 bool activate(Player* player); //!< Activates the hint for the input player. 86 bool setActive(PlayerInfo* player); //!< Activates the QuestHint for the input player. 87 bool setQuest(Quest* quest); //!< Sets the Quest the QuestHint belongs to. 76 88 77 bool setQuest(Quest* quest); //!< Sets the quest the hint belongs to. 78 89 /** 90 @brief Returns the Quest the QuestHint is attached to. 91 @return Returns a pointer to the Quest the QuestHint is attached to. 92 */ 79 93 inline Quest* getQuest(void) 80 94 { return this->quest_; } 81 95 82 96 private: 83 84 void initialize(void); 85 86 Quest* quest_; //!< The quest the hint belongs to. 87 std::map<Player*, questHintStatus::Enum> playerStatus_; //!< List of the status for each player, with the Player-pointer as key. 97 Quest* quest_; //!< The Quest the QuestHint belongs to. 98 std::map<const PlayerInfo*, questHintStatus::Enum> playerStatus_; //!< List of the status for each player, with the Player-pointer as key. 88 99 89 100 }; - Property svn:mergeinfo changed
Note: See TracChangeset
for help on using the changeset viewer.