Last change
on this file since 8771 was
8724,
checked in by bensch, 19 years ago
|
merged the bsp-model-stuff back here
|
File size:
1.1 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 | |
---|
16 | namespace OrxSound{ class SoundSource; } |
---|
17 | namespace OrxSound{ class SoundBuffer; } |
---|
18 | |
---|
19 | class TiXmlElement; |
---|
20 | |
---|
21 | |
---|
22 | class 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 | bool walkTo(const Vector& coordinate, float time); |
---|
41 | bool walkTo(float x, float y, float z, float time); |
---|
42 | |
---|
43 | void destroy(); |
---|
44 | |
---|
45 | virtual void tick (float time); |
---|
46 | |
---|
47 | |
---|
48 | private: |
---|
49 | OrxSound::SoundSource soundSource; |
---|
50 | OrxSound::SoundBuffer* soundBuffer; |
---|
51 | float soundVolume; |
---|
52 | }; |
---|
53 | |
---|
54 | #endif /* _GENERIC_ENTITY_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.