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.cc

    r2105 r2261  
    2727 */
    2828
     29/**
     30    @file AddReward.cc
     31    @brief
     32    Implementation of the AddReward class.
     33*/
     34
    2935#include "OrxonoxStableHeaders.h"
    3036#include "AddReward.h"
     
    3238#include "core/CoreIncludes.h"
    3339
     40#include "orxonox/objects/infos/PlayerInfo.h"
    3441#include "Rewardable.h"
    3542
     
    3845    CreateFactory(AddReward);
    3946
     47    /**
     48    @brief
     49        Constructor. Registers the object.
     50    */
    4051    AddReward::AddReward(BaseObject* creator) : QuestEffect(creator)
    4152    {
    4253        RegisterObject(AddReward);
    43 
    44         this->initialize();
    4554    }
    4655
     
    5362    }
    5463
     64    /**
     65        Method for creating a AddReward object through XML.
     66    */
    5567    void AddReward::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    5668    {
     
    5870
    5971        XMLPortObject(AddReward, Rewardable, "", addRewardable, getRewardables, xmlelement, mode);
    60 
     72       
     73        COUT(3) << "New AddReward, with " << this->rewards_.size() << " Rewardables created." << std::endl;
    6174    }
    6275
    6376    /**
    6477    @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.
    6683    */
    67     void AddReward::initialize(void)
    68     {
    69         RegisterObject(AddReward);
    70     }
    71 
    7284    const Rewardable* AddReward::getRewardables(unsigned int index) const
    7385    {
     
    8698    /**
    8799    @brief
    88         Invokes the effect.
     100        Invokes the QuestEffect.
    89101    @param player
    90102        The player.
    91103    @return
    92         Returns true if the effect was invoked successfully.
     104        Returns true if the QuestEffect was invoked successfully.
    93105    */
    94     bool AddReward::invoke(Player* player)
     106    bool AddReward::invoke(PlayerInfo* player)
    95107    {
    96108        bool check = true;
Note: See TracChangeset for help on using the changeset viewer.