Last change
on this file since 6543 was
6512,
checked in by bensch, 19 years ago
|
orxonox/trunk: loadParams is now virtual.
ALL THE CLASSES HAVE TO CALL
SuperClass::loadParams(root);
isntead of:
static_cast<SuperClass*>(this)→loadParams(root);
which was quite stupid anyways
|
File size:
856 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 | |
---|
11 | class Material; |
---|
12 | |
---|
13 | typedef enum PowerUpRespawn { |
---|
14 | RESPAWN_NONE, |
---|
15 | RESPAWN_TIME, |
---|
16 | RESPAWN_size |
---|
17 | } PowerUpRespawn; |
---|
18 | |
---|
19 | class PowerUp : public WorldEntity { |
---|
20 | |
---|
21 | public: |
---|
22 | virtual void loadParams(const TiXmlElement* root); |
---|
23 | void collidesWith (WorldEntity* entity, const Vector& location); |
---|
24 | |
---|
25 | virtual void draw () const; |
---|
26 | void setRespawnType(const char* type); |
---|
27 | |
---|
28 | int writeState(const byte* data, int length, int sender); |
---|
29 | int readState(byte* data, int maxLength ); |
---|
30 | |
---|
31 | protected: |
---|
32 | PowerUp(float r, float g, float b); |
---|
33 | virtual ~PowerUp (); |
---|
34 | virtual void respawn() {}; |
---|
35 | |
---|
36 | private: |
---|
37 | Material* sphereMaterial; |
---|
38 | PowerUpRespawn respawnType; |
---|
39 | static const char* respawnTypes[]; |
---|
40 | }; |
---|
41 | |
---|
42 | #endif /* _POWER_UP_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.