Last change
on this file since 9406 was
7954,
checked in by patrick, 18 years ago
|
trunk: merged the network branche back to trunk.
|
File size:
1.0 KB
|
Rev | Line | |
---|
[6113] | 1 | /*! |
---|
| 2 | * @file weapon_power_up.h |
---|
| 3 | * @brief A class representing a PowerUp modifying parameters. |
---|
| 4 | */ |
---|
| 5 | |
---|
| 6 | #ifndef _PARAM_POWER_UP_H |
---|
| 7 | #define _PARAM_POWER_UP_H |
---|
| 8 | |
---|
| 9 | #include "power_up.h" |
---|
| 10 | |
---|
| 11 | /* FORWARD DEFINITION */ |
---|
| 12 | |
---|
| 13 | typedef enum EnumParamPowerUpType { |
---|
[6547] | 14 | POWERUP_PARAM_SHIELD, |
---|
| 15 | POWERUP_PARAM_MAX_SHIELD, |
---|
| 16 | POWERUP_PARAM_HEALTH, |
---|
| 17 | POWERUP_PARAM_MAX_HEALTH, |
---|
| 18 | POWERUP_PARAM_size |
---|
[6113] | 19 | } EnumParamPowerUpType; |
---|
| 20 | |
---|
| 21 | class ParamPowerUp : public PowerUp { |
---|
| 22 | |
---|
| 23 | public: |
---|
[7065] | 24 | ParamPowerUp(const TiXmlElement* root = NULL); |
---|
[6113] | 25 | virtual ~ParamPowerUp (); |
---|
| 26 | |
---|
[6547] | 27 | void setValue(float value); |
---|
| 28 | void setMaxValue(float value); |
---|
| 29 | void setMinValue(float value); |
---|
[7221] | 30 | void setType(const std::string& type); |
---|
[6113] | 31 | EnumParamPowerUpType getType(); |
---|
[6547] | 32 | float getValue(); |
---|
[6113] | 33 | |
---|
| 34 | protected: |
---|
| 35 | virtual void respawn(); |
---|
| 36 | |
---|
| 37 | private: |
---|
| 38 | void init(); |
---|
[6512] | 39 | virtual void loadParams(const TiXmlElement* root); |
---|
[6113] | 40 | |
---|
| 41 | private: |
---|
[7221] | 42 | EnumParamPowerUpType type; |
---|
| 43 | float value; |
---|
| 44 | float max_value; |
---|
| 45 | float min_value; |
---|
| 46 | |
---|
| 47 | static const char* paramTypes[]; |
---|
| 48 | |
---|
[6113] | 49 | }; |
---|
| 50 | |
---|
| 51 | #endif /* _PARAM_POWER_UP_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.