source:
orxonox.OLD/branches/powerups/src/world_entities/power_ups/power_up.h
@
6107
Last change on this file since 6107 was 6107, checked in by manuel, 18 years ago | |
---|---|
File size: 760 bytes |
Rev | Line | |
---|---|---|
[5433] | 1 | /*! |
[5039] | 2 | * @file power_up.h |
[5433] | 3 | * @brief A class representing a PowerUp in the world. |
4 | */ | |
[2077] | 5 | |
[3224] | 6 | #ifndef _POWER_UP_H |
7 | #define _POWER_UP_H | |
[2077] | 8 | |
9 | #include "world_entity.h" | |
10 | ||
[6040] | 11 | class Material; |
12 | ||
[6107] | 13 | typedef enum PowerUpRespawn { |
14 | RESPAWN_NONE, | |
15 | RESPAWN_TIME, | |
16 | RESPAWN_size | |
17 | } PowerUpRespawn; | |
18 | ||
[5434] | 19 | class PowerUp : public WorldEntity { |
[2077] | 20 | |
[5871] | 21 | public: |
22 | void loadParams(const TiXmlElement* root); | |
23 | void collidesWith (WorldEntity* entity, const Vector& location); | |
24 | ||
[6107] | 25 | virtual void draw () const; |
26 | void setRespawnType(const char* type); | |
[6040] | 27 | |
[5873] | 28 | protected: |
[6040] | 29 | PowerUp(float r, float g, float b); |
[5873] | 30 | virtual ~PowerUp (); |
[6107] | 31 | virtual void respawn() {}; |
[6040] | 32 | |
33 | static Model* sphereModel; | |
34 | ||
35 | private: | |
36 | Material* sphereMaterial; | |
[6107] | 37 | PowerUpRespawn respawnType; |
38 | static const char* respawnTypes[]; | |
[2077] | 39 | }; |
40 | ||
[3224] | 41 | #endif /* _POWER_UP_H */ |
Note: See TracBrowser
for help on using the repository browser.