Changeset 2092 for code/trunk/src/orxonox/objects/quest/Quest.h
- Timestamp:
- Nov 1, 2008, 8:32:10 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/quest/Quest.h
r2091 r2092 67 67 { 68 68 public: 69 Quest( );69 Quest(BaseObject* creator); 70 70 virtual ~Quest(); 71 71 72 72 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 73 73 74 74 inline Quest* getParentQuest(void) const //!< Returns the parent quest of the quest. 75 75 { return this->parentQuest_; } 76 76 inline const std::list<Quest*> & getSubQuestList(void) const //!< Returns the list of sub quests. 77 77 { return this->subQuests_; } 78 78 79 79 bool isInactive(const Player* player) const; //!< Returns true if the quest status for the specific player is 'inactive'. 80 80 bool isActive(const Player* player) const; //!< Returns true if the quest status for the specific player is 'active'. 81 81 bool isFailed(const Player* player) const; //!< Returns true if the quest status for the specific player is 'failed'. 82 82 bool isCompleted(const Player* player) const; //!< Returns true if the quest status for the specific player is 'completed'. 83 83 84 84 bool start(Player* player); //!< Sets a quest to active. 85 85 bool fail(Player* player); //!< Fails the quest. 86 86 bool complete(Player* player); //!< Completes the quest. 87 87 88 88 protected: 89 89 void initialize(void); //!< Initialized the object. 90 90 91 91 virtual bool isStartable(const Player* player) const = 0; //!< Checks whether the quest can be started. 92 92 virtual bool isFailable(const Player* player) const = 0; //!< Checks whether the quest can be failed. 93 93 virtual bool isCompletable(const Player* player) const = 0; //!< Checks whether the quest can be completed. 94 94 95 95 bool setParentQuest(Quest* quest); //!< Sets the parent quest of the quest. 96 96 bool addSubQuest(Quest* quest); //!< Adds a sub quest to the quest. … … 98 98 bool addFailEffect(QuestEffect* effect); 99 99 bool addCompleteEffect(QuestEffect* effect); 100 100 101 101 const Quest* getParentQuest(void); 102 102 const Quest* getSubQuests(unsigned int index) const; … … 104 104 const QuestEffect* getFailEffects(unsigned int index) const; 105 105 const QuestEffect* getCompleteEffects(unsigned int index) const; 106 106 107 107 virtual questStatus::Enum getStatus(const Player* player) const = 0; //!< Returns the status of the quest for a specific player. 108 108 virtual bool setStatus(Player* player, const questStatus::Enum & status) = 0; //!< Changes the status for a specific player. 109 109 110 110 Quest* parentQuest_; //!< Pointer to the parent quest. 111 111 std::list<Quest*> subQuests_; //!< List of all the sub quests. 112 112 113 113 std::list<QuestHint*> hints_; //!< A list of all the hints tied to this quest. 114 114 115 115 std::list<QuestEffect*> failEffects_; //!< A list of all effects to be invoked, when the quest has been failed. 116 116 std::list<QuestEffect*> completeEffects_; //!< A list of effects to be invoked, when the quest has been completed.
Note: See TracChangeset
for help on using the changeset viewer.