Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 9869 was 9869, checked in by bensch, 18 years ago

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

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 {
[9869]23  ObjectListDeclaration(PowerUp);
[2077]24
[6113]25public:
[6512]26  virtual void loadParams(const TiXmlElement* root);
[6113]27  void collidesWith (WorldEntity* entity, const Vector& location);
28
[7221]29  void loadPickupSound(const std::string& pickupSound);
30  void loadRespawnSound(const std::string& respawnSound);
[7065]31
[6113]32  virtual void draw () const;
[6589]33  virtual void tick(float dt);
[7221]34  void setRespawnType(const std::string& type);
[6973]35  void setRespawnTime(const float respawn);
[6113]36
37protected:
38  PowerUp(float r, float g, float b);
[3544]39  virtual ~PowerUp ();
[7077]40
41protected:
[6589]42  Model* model;
[6113]43
44private:
[7460]45  OrxSound::SoundSource  soundSource;
[9869]46  OrxSound::SoundBuffer  pickupBuffer;
47  OrxSound::SoundBuffer  respawnBuffer;
[7460]48  Material*              sphereMaterial;
49  PowerUpRespawn         respawnType;
50  float                  respawnTime;
51  float                  respawnStart;
52  static const char*     respawnTypes[];
[7102]53
[7460]54  WorldEntity*           collider;
[2077]55};
56
[3224]57#endif /* _POWER_UP_H */
Note: See TracBrowser for help on using the repository browser.