Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 7954 was 7954, checked in by patrick, 18 years ago

trunk: merged the network branche back to trunk.

File size: 1.2 KB
RevLine 
[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
[7065]11#include "sound_buffer.h"
12#include "sound_source.h"
13
[6113]14class Material;
15
16typedef enum PowerUpRespawn {
17  RESPAWN_NONE,
18  RESPAWN_TIME,
19  RESPAWN_size
20} PowerUpRespawn;
21
[5434]22class PowerUp : public WorldEntity {
[2077]23
[6113]24public:
[6512]25  virtual void loadParams(const TiXmlElement* root);
[6113]26  void collidesWith (WorldEntity* entity, const Vector& location);
27
[7221]28  void loadPickupSound(const std::string& pickupSound);
29  void loadRespawnSound(const std::string& respawnSound);
[7065]30
[6113]31  virtual void draw () const;
[6589]32  virtual void tick(float dt);
[7221]33  void setRespawnType(const std::string& type);
[6973]34  void setRespawnTime(const float respawn);
[6113]35
36protected:
37  PowerUp(float r, float g, float b);
[3544]38  virtual ~PowerUp ();
[7077]39
40protected:
[6589]41  Model* model;
[6113]42
43private:
[7460]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[];
[7102]52
[7460]53  WorldEntity*           collider;
[2077]54};
55
[3224]56#endif /* _POWER_UP_H */
Note: See TracBrowser for help on using the repository browser.