Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/power_ups/param_power_up.h @ 6424

Last change on this file since 6424 was 6424, checked in by bensch, 18 years ago

orxonox/trunk: merged the branche network back to the trunk
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/network . -r 6351:HEAD
no conflicts

File size: 1004 bytes
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
13typedef enum EnumParamPowerUpType {
14  PARAM_SHIELD,
15  PARAM_size
16} EnumParamPowerUpType;
17
18class ParamPowerUp : public PowerUp {
19
20public:
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
35protected:
36  virtual void respawn();
37
38private:
39  void init();
40  void loadParams(const TiXmlElement* root);
41
42private:
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.