Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/power_ups/power_up.h @ 6973

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

orxonox/trunk: added powerups

File size: 961 bytes
Line 
1/*!
2 * @file power_up.h
3 * @brief A class representing a PowerUp in the world.
4*/
5
6#ifndef _POWER_UP_H
7#define _POWER_UP_H
8
9#include "world_entity.h"
10
11class Material;
12
13typedef enum PowerUpRespawn {
14  RESPAWN_NONE,
15  RESPAWN_TIME,
16  RESPAWN_size
17} PowerUpRespawn;
18
19class PowerUp : public WorldEntity {
20
21public:
22  virtual void loadParams(const TiXmlElement* root);
23  void collidesWith (WorldEntity* entity, const Vector& location);
24
25  virtual void draw () const;
26  virtual void tick(float dt);
27  void setRespawnType(const char* type);
28  void setRespawnTime(const float respawn);
29
30  int       writeState(const byte* data, int length, int sender);
31  int       readState(byte* data, int maxLength );
32
33protected:
34  PowerUp(float r, float g, float b);
35  virtual ~PowerUp ();
36  Model* model;
37
38private:
39  Material* sphereMaterial;
40  PowerUpRespawn respawnType;
41  float respawnTime;
42  float respawnStart;
43  static const char* respawnTypes[];
44};
45
46#endif /* _POWER_UP_H */
Note: See TracBrowser for help on using the repository browser.