- Timestamp:
- Nov 6, 2008, 12:02:05 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem2/src/orxonox/objects/quest/QuestHint.h
r2096 r2146 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 64 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. 65 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 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(ControllableEntity* player); //!< Returns true if the hint is active for the input player. 74 85 75 bool activate(Player* player); //!< Activates the hint for the input player. 76 86 bool setActive(ControllableEntity* player); //!< Activates the hint for the input player. 77 87 bool setQuest(Quest* quest); //!< Sets the quest the hint belongs to. 78 88 79 inline Quest* getQuest(void) 89 inline Quest* getQuest(void) //!< Returns the quest the hint is attached to. 80 90 { return this->quest_; } 81 91 82 92 private: 93 Quest* quest_; //!< The quest the hint belongs to. 94 std::map<ControllableEntity*, questHintStatus::Enum> playerStatus_; //!< List of the status for each player, with the Player-pointer as key. 83 95 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. 96 void initialize(void); //!< Initializes the object. 88 97 89 98 };
Note: See TracChangeset
for help on using the changeset viewer.