Line | |
---|
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 { |
---|
14 | PARAM_SHIELD, |
---|
15 | PARAM_size |
---|
16 | } EnumParamPowerUpType; |
---|
17 | |
---|
18 | class ParamPowerUp : public PowerUp { |
---|
19 | |
---|
20 | public: |
---|
21 | ParamPowerUp(); |
---|
22 | ParamPowerUp(const TiXmlElement* root); |
---|
23 | virtual ~ParamPowerUp (); |
---|
24 | |
---|
25 | void setValue(int value); |
---|
26 | void setMaxValue(int value); |
---|
27 | void setMinValue(int value); |
---|
28 | void setType(const char* type); |
---|
29 | EnumParamPowerUpType getType(); |
---|
30 | int getValue(); |
---|
31 | |
---|
32 | virtual int writeBytes(const byte* data, int length, int sender); |
---|
33 | virtual int readBytes(byte* data, int maxLength, int * reciever ); |
---|
34 | |
---|
35 | protected: |
---|
36 | virtual void respawn(); |
---|
37 | |
---|
38 | private: |
---|
39 | void init(); |
---|
40 | void loadParams(const TiXmlElement* root); |
---|
41 | |
---|
42 | private: |
---|
43 | static const char* paramTypes[]; |
---|
44 | EnumParamPowerUpType type; |
---|
45 | int value; |
---|
46 | int max_value; |
---|
47 | int min_value; |
---|
48 | }; |
---|
49 | |
---|
50 | #endif /* _PARAM_POWER_UP_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.