source:
orxonox.OLD/trunk/src/world_entities/power_ups/power_up.h
@
6787
Last change on this file since 6787 was 6589, checked in by bensch, 19 years ago | |
---|---|
File size: 946 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 | ||
[6113] | 11 | class Material; |
12 | ||
13 | typedef enum PowerUpRespawn { | |
14 | RESPAWN_NONE, | |
15 | RESPAWN_TIME, | |
16 | RESPAWN_size | |
17 | } PowerUpRespawn; | |
18 | ||
[5434] | 19 | class PowerUp : public WorldEntity { |
[2077] | 20 | |
[6113] | 21 | public: |
[6512] | 22 | virtual void loadParams(const TiXmlElement* root); |
[6113] | 23 | void collidesWith (WorldEntity* entity, const Vector& location); |
24 | ||
25 | virtual void draw () const; | |
[6589] | 26 | virtual void tick(float dt); |
[6113] | 27 | void setRespawnType(const char* type); |
28 | ||
[6424] | 29 | int writeState(const byte* data, int length, int sender); |
30 | int readState(byte* data, int maxLength ); | |
31 | ||
[6113] | 32 | protected: |
33 | PowerUp(float r, float g, float b); | |
[3544] | 34 | virtual ~PowerUp (); |
[6113] | 35 | virtual void respawn() {}; |
[6589] | 36 | Model* model; |
[6113] | 37 | |
38 | private: | |
39 | Material* sphereMaterial; | |
40 | PowerUpRespawn respawnType; | |
[6589] | 41 | float respawnTime; |
42 | float respawnStart; | |
[6113] | 43 | static const char* respawnTypes[]; |
[2077] | 44 | }; |
45 | ||
[3224] | 46 | #endif /* _POWER_UP_H */ |
Note: See TracBrowser
for help on using the repository browser.