Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/std/src/world_entities/power_ups/param_power_up.h @ 7216

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

orxonox/std:: compile and run again, with many more std::strings….

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