Changeset 2261 for code/trunk/src/orxonox/objects/quest/AddReward.h
- 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.h
- Property svn:mergeinfo changed
/code/branches/questsystem2/src/orxonox/objects/quest/AddReward.h (added) merged: 2146,2159,2191,2205,2221,2251 /code/trunk/src/orxonox/objects/quest/AddReward.h merged: 1925-2089
r2096 r2261 27 27 */ 28 28 29 /** 30 @file AddReward.h 31 @brief 32 Definition of the AddReward class. 33 */ 34 29 35 #ifndef _AddReward_H__ 30 36 #define _AddReward_H__ … … 39 45 namespace orxonox { 40 46 41 class Player; //Forward declaration, remove when fully integrated into the objecthirarchy.42 43 47 /** 44 48 @brief 45 Adds a list of rewards to a player. 49 Adds a list of Rewardables to a player. 50 51 Creating a AddReward through XML goes as follows: 52 53 <AddReward> 54 <Rewardable /> //A list of Rewardable objects to be rewarded the player, see the specific Rewardables for their respective XML representations. 55 ... 56 <Rewardable /> 57 </AddReward> 46 58 @author 47 59 Damian 'Mozork' Frick … … 53 65 virtual ~AddReward(); 54 66 55 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 67 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a AddReward object through XML. 56 68 57 virtual bool invoke(Player * player); //!< Invokes the effect.69 virtual bool invoke(PlayerInfo* player); //!< Invokes the QuestEffect. 58 70 59 71 private: 60 std::list<Rewardable*> rewards_; 72 std::list<Rewardable*> rewards_; //!< A list of Rewardables to be added to the player invoking the QuestEffect. 61 73 62 void initialize(void); //!< Initializes the object. 63 74 /** 75 @brief Add a Rewardable object to the list of objects to be awarded to the player invoking the QuestEffect. 76 @param reward Pointer to the Rewardable to be added. 77 */ 64 78 inline void addRewardable(Rewardable* reward) 65 79 { this->rewards_.push_back(reward); } 66 const Rewardable* getRewardables(unsigned int index) const; 80 const Rewardable* getRewardables(unsigned int index) const; //!< Returns the Rewardable object at the given index. 67 81 68 82 }; - Property svn:mergeinfo changed
Note: See TracChangeset
for help on using the changeset viewer.