Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/npcs/generic_npc.h @ 8724

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

merged the bsp-model-stuff back here

File size: 1.1 KB
RevLine 
[8514]1
2/*!
3 * @file generic_npc.h
4 * generic npc object
5 */
6
7#ifndef _GENERIC_ENTITY_H
8#define _GENERIC_ENTITY_H
9
10#include "npc.h"
11
12#include <string>
[8516]13//
14#include "sound_source.h"
[8514]15
[8516]16namespace OrxSound{ class SoundSource; }
17namespace OrxSound{ class SoundBuffer; }
[8514]18
19class TiXmlElement;
20
21
22class GenericNPC : public NPC
23{
24 public:
25  GenericNPC(const TiXmlElement* root);
26  virtual ~GenericNPC ();
27
28  void init();
29  virtual void loadParams(const TiXmlElement* root);
30
31  void setAnimation(int animationIndex, int animPlaybackMode);
[8516]32  /** sets the sound volume to @param vol: volume of the sound */
33  inline void setVolume(float vol) { this->soundVolume = vol; }
[8514]34
[8705]35  void playAnimation(int animationIndex, int animPlaybackMode);
36
37  void playSound(std::string filename);
38  void playSound(int i);
39
[8581]40  bool walkTo(const Vector& coordinate, float time);
41  bool walkTo(float x, float y, float z, float time);
[8514]42
43  void destroy();
44
45  virtual void tick (float time);
46
47
48 private:
[8516]49   OrxSound::SoundSource                   soundSource;
50   OrxSound::SoundBuffer*                  soundBuffer;
51   float                                   soundVolume;
[8514]52};
53
54#endif /* _GENERIC_ENTITY_H */
Note: See TracBrowser for help on using the repository browser.