Last change
on this file since 6787 was
6547,
checked in by bensch, 19 years ago
|
orxonox/trunk: merged the WeaponManager back to the trunk
|
File size:
1.1 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: |
---|
| 24 | ParamPowerUp(); |
---|
| 25 | ParamPowerUp(const TiXmlElement* root); |
---|
| 26 | virtual ~ParamPowerUp (); |
---|
| 27 | |
---|
[6547] | 28 | void setValue(float value); |
---|
| 29 | void setMaxValue(float value); |
---|
| 30 | void setMinValue(float value); |
---|
[6113] | 31 | void setType(const char* type); |
---|
| 32 | EnumParamPowerUpType getType(); |
---|
[6547] | 33 | float getValue(); |
---|
[6113] | 34 | |
---|
[6424] | 35 | virtual int writeBytes(const byte* data, int length, int sender); |
---|
| 36 | virtual int readBytes(byte* data, int maxLength, int * reciever ); |
---|
| 37 | |
---|
[6113] | 38 | protected: |
---|
| 39 | virtual void respawn(); |
---|
| 40 | |
---|
| 41 | private: |
---|
| 42 | void init(); |
---|
[6512] | 43 | virtual void loadParams(const TiXmlElement* root); |
---|
[6113] | 44 | |
---|
| 45 | private: |
---|
| 46 | static const char* paramTypes[]; |
---|
| 47 | EnumParamPowerUpType type; |
---|
[6547] | 48 | float value; |
---|
| 49 | float max_value; |
---|
| 50 | float min_value; |
---|
[6113] | 51 | }; |
---|
| 52 | |
---|
| 53 | #endif /* _PARAM_POWER_UP_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.