- Timestamp:
- Oct 30, 2008, 9:52:12 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem/src/orxonox/objects/QuestHint.h
r2021 r2068 33 33 #include <string> 34 34 35 #include "core/XMLPort.h" 35 36 #include "QuestDescription.h" 36 37 #include "QuestItem.h" … … 56 57 @brief 57 58 Represents a hint in the game towards completing a Quest. 58 Consists of title and description in textual form. 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. 59 61 @author 60 62 Damian 'Mozork' Frick … … 65 67 public: 66 68 QuestHint(); 67 QuestHint(std::string id , std::string title = "", std::string description = "");69 QuestHint(std::string id); 68 70 ~QuestHint(); 71 72 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 69 73 70 74 bool isActive(Player* player); //!< Returns true if the hint is active for the input player. … … 72 76 bool activate(Player* player); //!< Activates the hint for the input player. 73 77 74 void setQuest(Quest* quest); //!< Sets the quest the hint belongs to. 78 bool setQuest(Quest* quest); //!< Sets the quest the hint belongs to. 79 80 inline Quest* getQuest(void) 81 { return this->quest_; } 75 82 76 83 private: 77 84 78 Quest* quest_; 79 std::map<Player*, questHintStatus::Enum> playerStatus_; 85 void initialize(void); 86 87 Quest* quest_; //!< The quest the hint belongs to. 88 std::map<Player*, questHintStatus::Enum> playerStatus_; //!< List of the status for each player, with the Player-pointer as key. 80 89 81 90 };
Note: See TracChangeset
for help on using the changeset viewer.