Changeset 2261 for code/trunk/src/orxonox/objects/quest/AddReward.cc
- 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/AddReward.cc
- Property svn:mergeinfo changed
/code/branches/questsystem2/src/orxonox/objects/quest/AddReward.cc (added) merged: 2146,2159,2191,2205,2226,2228,2251 /code/trunk/src/orxonox/objects/quest/AddReward.cc merged: 1925-2089
r2105 r2261 27 27 */ 28 28 29 /** 30 @file AddReward.cc 31 @brief 32 Implementation of the AddReward class. 33 */ 34 29 35 #include "OrxonoxStableHeaders.h" 30 36 #include "AddReward.h" … … 32 38 #include "core/CoreIncludes.h" 33 39 40 #include "orxonox/objects/infos/PlayerInfo.h" 34 41 #include "Rewardable.h" 35 42 … … 38 45 CreateFactory(AddReward); 39 46 47 /** 48 @brief 49 Constructor. Registers the object. 50 */ 40 51 AddReward::AddReward(BaseObject* creator) : QuestEffect(creator) 41 52 { 42 53 RegisterObject(AddReward); 43 44 this->initialize();45 54 } 46 55 … … 53 62 } 54 63 64 /** 65 Method for creating a AddReward object through XML. 66 */ 55 67 void AddReward::XMLPort(Element& xmlelement, XMLPort::Mode mode) 56 68 { … … 58 70 59 71 XMLPortObject(AddReward, Rewardable, "", addRewardable, getRewardables, xmlelement, mode); 60 72 73 COUT(3) << "New AddReward, with " << this->rewards_.size() << " Rewardables created." << std::endl; 61 74 } 62 75 63 76 /** 64 77 @brief 65 Initializes the object. Needs to be called first by every constructor of this class. 78 Returns the Rewardable object at the given index. 79 @param index 80 The index. 81 @return 82 Returns a pointer to the Rewardable object at the given index. 66 83 */ 67 void AddReward::initialize(void)68 {69 RegisterObject(AddReward);70 }71 72 84 const Rewardable* AddReward::getRewardables(unsigned int index) const 73 85 { … … 86 98 /** 87 99 @brief 88 Invokes the effect.100 Invokes the QuestEffect. 89 101 @param player 90 102 The player. 91 103 @return 92 Returns true if the effect was invoked successfully.104 Returns true if the QuestEffect was invoked successfully. 93 105 */ 94 bool AddReward::invoke(Player * player)106 bool AddReward::invoke(PlayerInfo* player) 95 107 { 96 108 bool check = true; - Property svn:mergeinfo changed
Note: See TracChangeset
for help on using the changeset viewer.