Changeset 2021 for code/branches/questsystem/src/orxonox/objects/Quest.cc
- Timestamp:
- Oct 27, 2008, 8:31:20 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem/src/orxonox/objects/Quest.cc
r1996 r2021 28 28 29 29 #include "core/CoreIncludes.h" 30 30 31 #include "Quest.h" 31 32 32 33 namespace orxonox { 33 34 34 CreateFactory(Quest); 35 Quest::Quest() : QuestItem() 36 { 37 38 } 35 39 36 40 /** … … 44 48 The description of the quest. 45 49 */ 46 Quest::Quest(std::string id, std::string title = "", std::string description = "") : QuestItem(id, title, description)50 Quest::Quest(std::string id, std::string title, std::string description) : QuestItem(id, title, description) 47 51 { 48 52 initialize(); … … 75 79 A pointer to the quest to be set as parent quest. 76 80 */ 77 bool setParentQuest(Quest* quest)81 bool Quest::setParentQuest(Quest* quest) 78 82 { 79 83 this->parentQuest_ = quest; … … 87 91 A pointer to the quest to be set as sub quest. 88 92 */ 89 bool addSubQuest(Quest &quest)93 bool Quest::addSubQuest(Quest* quest) 90 94 { 91 this->subQuests_.push_back = quest;95 this->subQuests_.push_back(quest); 92 96 return true; 93 97 } … … 99 103 The hint that should be added to the list of hints. 100 104 */ 101 void Quest::addHint(QuestHint &hint)105 void Quest::addHint(QuestHint* hint) 102 106 { 103 107 if ( hint != NULL ) 104 108 { 105 109 this->hints_.push_back(hint); 106 hint .setQuest(this);110 hint->setQuest(this); 107 111 } 108 112 else … … 120 124 Returns true if the quest could be started, false if not. 121 125 */ 122 bool Quest::start( const Player &player)126 bool Quest::start(Player* player) 123 127 { 124 128 if(this->isStartable(player)) … … 139 143 Returns true if the quest could be failed, false if not. 140 144 */ 141 void Quest::fail(Player &player)145 bool Quest::fail(Player* player) 142 146 { 143 147 if(this->isFailable(player)) … … 159 163 Returns true if the quest could be completed, false if not. 160 164 */ 161 void Quest::complete(Player &player)165 bool Quest::complete(Player* player) 162 166 { 163 167 if(this->isCompletable(player))
Note: See TracChangeset
for help on using the changeset viewer.