Last change
on this file since 9193 was
7954,
checked in by patrick, 18 years ago
|
trunk: merged the network branche back to trunk.
|
File size:
1.2 KB
|
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 | #include "sound_buffer.h" |
---|
12 | #include "sound_source.h" |
---|
13 | |
---|
14 | class Material; |
---|
15 | |
---|
16 | typedef enum PowerUpRespawn { |
---|
17 | RESPAWN_NONE, |
---|
18 | RESPAWN_TIME, |
---|
19 | RESPAWN_size |
---|
20 | } PowerUpRespawn; |
---|
21 | |
---|
22 | class PowerUp : public WorldEntity { |
---|
23 | |
---|
24 | public: |
---|
25 | virtual void loadParams(const TiXmlElement* root); |
---|
26 | void collidesWith (WorldEntity* entity, const Vector& location); |
---|
27 | |
---|
28 | void loadPickupSound(const std::string& pickupSound); |
---|
29 | void loadRespawnSound(const std::string& respawnSound); |
---|
30 | |
---|
31 | virtual void draw () const; |
---|
32 | virtual void tick(float dt); |
---|
33 | void setRespawnType(const std::string& type); |
---|
34 | void setRespawnTime(const float respawn); |
---|
35 | |
---|
36 | protected: |
---|
37 | PowerUp(float r, float g, float b); |
---|
38 | virtual ~PowerUp (); |
---|
39 | |
---|
40 | protected: |
---|
41 | Model* model; |
---|
42 | |
---|
43 | private: |
---|
44 | OrxSound::SoundSource soundSource; |
---|
45 | OrxSound::SoundBuffer* pickupBuffer; |
---|
46 | OrxSound::SoundBuffer* respawnBuffer; |
---|
47 | Material* sphereMaterial; |
---|
48 | PowerUpRespawn respawnType; |
---|
49 | float respawnTime; |
---|
50 | float respawnStart; |
---|
51 | static const char* respawnTypes[]; |
---|
52 | |
---|
53 | WorldEntity* collider; |
---|
54 | }; |
---|
55 | |
---|
56 | #endif /* _POWER_UP_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.