Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 8787 was 8783, checked in by patrick, 19 years ago

merged the script engine branche back to trunk

File size: 1.7 KB
Line 
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>
13//
14#include "sound_source.h"
15
16namespace OrxSound{ class SoundSource; }
17namespace OrxSound{ class SoundBuffer; }
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);
32  /** sets the sound volume to @param vol: volume of the sound */
33  inline void setVolume(float vol) { this->soundVolume = vol; }
34
35  void playAnimation(int animationIndex, int animPlaybackMode);
36
37  void playSound(std::string filename);
38  void playSound(int i);
39
40  float walkTo(const Vector& coordinate, const Quaternion& dir);
41  float walkTo(float x, float y, float z, float qu, float qx, float qy, float qz);
42  float walkTo(float x, float y, float qu, float qx, float qy, float qz);
43
44  float runTo(const Vector& coordinate, const Quaternion& dir);
45  float runTo(float x, float y, float z, float qu, float qx, float qy, float qz);
46  float runTo(float x, float y, float qu, float qx, float qy, float qz);
47
48  float crouchTo(const Vector& coordinate, const Quaternion& dir);
49  float crouchTo(float x, float y, float z, float qu, float qx, float qy, float qz);
50  float crouchTo(float x, float y, float qu, float qx, float qy, float qz);
51
52
53  void destroy();
54
55  virtual void tick (float time);
56
57
58 private:
59   OrxSound::SoundSource                   soundSource;
60   OrxSound::SoundBuffer*                  soundBuffer;
61   float                                   soundVolume;
62};
63
64#endif /* _GENERIC_ENTITY_H */
Note: See TracBrowser for help on using the repository browser.