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/items/HealthPickup.h

    r7541 r7547  
    3939
    4040#include <string>
    41 #include <worldentities/pawns/Pawn.h>
    42 #include "worldentities/StaticEntity.h"
    4341
    4442#include "pickup/Pickup.h"
     
    6563    /**
    6664    @brief
    67         The Health Pickup is a Pickupable that can do (dependent upon the parameters) lots of different things to the health of a Pawn.
    68         There are 4 parameters that can be chosen:
    69         - The <b>health</b> The amount of health that (in a way dependent on the other parameters) is transferred to the Pawn.
    70         - The <b>activation type</b> It can be chosen to be either <em>immediate</em> or <em>onUse</em>. The activation type essentially (as indicated by the name) defines when the health is transferred, either immediately after being picked up or only after the player uses it.
    71         - The <b>duration type</b> It can be chosen to be either <em>once</em> or <em>continuous</em>. For <em>once</em> the specified health is transferred once to the Pawn, for <em>continuous</em> the set health is transferred over a span of time at a rate defined by the health rate parameter.
    72         - The <b>health type</b> The health type can be chosen to be <em>limited</em>, <em>temporary</em> or <em>permanent</em>. <em>limited</em> means that the health is increased only to the maximum health of the Pawn. 'temporary' means that the maximum health is temporarily elevated but will be set back as soon as the pickup is no longer in use. <em>permanent</em> means that the maximum health of the Pawn is increased such that the health provided by the pickup will fit in and the maximum health stays that way.
     65        The HealthPickup is a Pickupable that can do (dependent upon the parameters) lots of different things to the health of a Pawn.
     66        There are 5 parameters that can be chosen:
     67        - The @b activationType It can be chosen to be either <em>immediate</em> or <em>onUse</em>. The activation type essentially (as indicated by the name) defines when the health is transferred, either immediately after being picked up or only after the player uses it. The default is <em>immediate</em>.
     68        - The @b durationType It can be chosen to be either <em>once</em> or <em>continuous</em>. For <em>once</em> the specified health is transferred once to the Pawn, for <em>continuous</em> the set health is transferred over a span of time at a rate defined by the health rate parameter. The default is <em>once</em>.
     69        - The @b health The amount of health that (in a way dependent on the other parameters) is transferred to the Pawn. Default is 0.
     70        - The @b healthType The health type can be chosen to be <em>limited</em>, <em>temporary</em> or <em>permanent</em>. <em>limited</em> means that the health is increased only to the maximum health of the Pawn. 'temporary' means that the maximum health is temporarily elevated but will be set back as soon as the pickup is no longer in use. <em>permanent</em> means that the maximum health of the Pawn is increased such that the health provided by the pickup will fit in and the maximum health stays that way. The default is <em>limited</em>.
     71        - The @b healthRate If set to continuous, the health that is transferred per second is the <em>healthRate</em>. There is health transferred until the health set by <em>health</em> is depleted. The default is 0.
    7372
    74         An examle of a XML implementation of a HealthPickup would be:
     73        An example of a XML implementation of a HealthPickup would be:
    7574        @code
    7675        <HealthPickup
     
    104103            @return Returns the health.
    105104            */
    106             inline float getHealth(void)
     105            inline float getHealth(void) const
    107106                { return this->health_; }
    108107            /**
     
    110109            @return Returns the rate.
    111110            */
    112             inline float getHealthRate(void)
     111            inline float getHealthRate(void) const
    113112                { return this->healthRate_; }
    114113
     
    117116            @return Returns the health type as an enum.
    118117            */
    119             inline pickupHealthType::Value getHealthTypeDirect(void)
     118            inline pickupHealthType::Value getHealthTypeDirect(void) const
    120119                { return this->healthType_; }
    121             const std::string& getHealthType(void); //!< Get the health type of this pickup.
     120            const std::string& getHealthType(void) const; //!< Get the health type of this pickup.
    122121
    123122        protected:
Note: See TracChangeset for help on using the changeset viewer.