Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 25, 2008, 11:56:40 PM (15 years ago)
Author:
landauf
Message:

merged questsystem2 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/objects/quest/AddReward.h

    r2096 r2261  
    2727 */
    2828
     29/**
     30    @file AddReward.h
     31    @brief
     32    Definition of the AddReward class.
     33*/
     34
    2935#ifndef _AddReward_H__
    3036#define _AddReward_H__
     
    3945namespace orxonox {
    4046
    41     class Player; //Forward declaration, remove when fully integrated into the objecthirarchy.
    42 
    4347    /**
    4448    @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>
    4658    @author
    4759        Damian 'Mozork' Frick
     
    5365            virtual ~AddReward();
    5466
    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.
    5668
    57             virtual bool invoke(Player* player); //!< Invokes the effect.
     69            virtual bool invoke(PlayerInfo* player); //!< Invokes the QuestEffect.
    5870
    5971        private:
    60             std::list<Rewardable*> rewards_;
     72            std::list<Rewardable*> rewards_; //!< A list of Rewardables to be added to the player invoking the QuestEffect.
    6173
    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            */
    6478            inline void addRewardable(Rewardable* reward)
    6579                { 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.
    6781
    6882    };
Note: See TracChangeset for help on using the changeset viewer.