Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 16, 2010, 12:37:09 PM (14 years ago)
Author:
dafrick
Message:

Documenting and cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/pickup/Pickup.h

    r7533 r7547  
    4040#include "core/BaseObject.h"
    4141#include "core/XMLPort.h"
     42#include "tools/Timer.h"
    4243
    4344#include "CollectiblePickup.h"
    44 
    45 #include "tools/Timer.h"
    4645
    4746namespace orxonox
     
    8382
    8483        Pickups ingeriting from this class can choose an activation type and a duration type.
    85         - The <b>activation type</b> deals with what happens to the Pickup as soon as it is picked up. It can either be set to <em>immediate</em>, which means that the Pickup is activated/used immediately upon being picked up. Or to <em>onUse</em>, which means, that the Pickup will be activated/used if some outside entity (most commonly the player through the PickupInventory) decides to use it.
    86         - The <b>duration type</b> deals with whether the Pickup has a continuous effect or whether its effect is focused on a singular instant. It can either be set to <em>once</em>, which means, that the Pickup just has an effect (at a singular instant in time) and is done once that effect has been applied. Or to <em>continuous</em>, which means that the effect of the Pickup unfolds over some timespan.
     84        - The <b>activationType</b> deals with what happens to the Pickup as soon as it is picked up. It can either be set to <em>immediate</em>, which means that the Pickup is activated/used immediately upon being picked up. Or to <em>onUse</em>, which means, that the Pickup will be activated/used if some outside entity (most commonly the player through the PickupInventory) decides to use it. Default is <em>immediate</em>.
     85        - The <b>durationType</b> deals with whether the Pickup has a continuous effect or whether its effect is focused on a singular instant. It can either be set to <em>once</em>, which means, that the Pickup just has an effect (at a singular instant in time) and is done once that effect has been applied. Or to <em>continuous</em>, which means that the effect of the Pickup unfolds over some timespan. Default is <em>once</em>.
    8786
    8887        If it were not an abstract class it could for example be used as follows in XML.
     
    110109            @return Returns the activation type of the Pickup.
    111110            */
    112             inline pickupActivationType::Value getActivationTypeDirect(void)
     111            inline pickupActivationType::Value getActivationTypeDirect(void) const
    113112                { return this->activationType_; }
    114113            /**
     
    116115            @return Returns the duration type of the Pickup.
    117116            */
    118             inline pickupDurationType::Value getDurationTypeDirect(void)
     117            inline pickupDurationType::Value getDurationTypeDirect(void) const
    119118                { return this->durationType_; }
    120119
    121             const std::string& getActivationType(void); //!< Get the activation type of the Pickup.
    122             const std::string& getDurationType(void); //!< Get the duration type of the Pickup.
     120            const std::string& getActivationType(void) const; //!< Get the activation type of the Pickup.
     121            const std::string& getDurationType(void) const; //!< Get the duration type of the Pickup.
    123122
    124123            /**
     
    126125            @return Returns true if the activation type is 'immediate'.
    127126            */
    128             inline bool isImmediate(void)
     127            inline bool isImmediate(void) const
    129128                { return this->getActivationTypeDirect() == pickupActivationType::immediate; }
    130129            /**
     
    132131            @return Returns true if the activation type is 'onUse'.
    133132            */
    134             inline bool isOnUse(void)
     133            inline bool isOnUse(void) const
    135134                { return this->getActivationTypeDirect() == pickupActivationType::onUse; }
    136135            /**
     
    138137            @return Returns true if the duration type is 'once'.
    139138            */
    140             inline bool isOnce(void)
     139            inline bool isOnce(void) const
    141140                { return this->getDurationTypeDirect() == pickupDurationType::once; }
    142141            /**
     
    144143            @return Returns true if the duration type is 'continuous'.
    145144            */
    146             inline bool isContinuous(void)
     145            inline bool isContinuous(void) const
    147146                { return this->getDurationTypeDirect() == pickupDurationType::continuous; }
    148147
    149148            virtual void changedPickedUp(void); //!< Should be called when the pickup has transited from picked up to dropped or the other way around.
    150 
    151149            virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the OrxonoxClass.
    152150
Note: See TracChangeset for help on using the changeset viewer.