Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/single_player_map/src/world_entities/npcs/generic_npc.h @ 8811

Last change on this file since 8811 was 8811, checked in by snellen, 18 years ago

executor should now be able to take up to 7 parameters

File size: 2.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>
[8793]13
[8516]14#include "sound_source.h"
[8514]15
[8793]16#include "vector.h"
[8796]17#include "quaternion.h"
[8793]18
19
[8516]20namespace OrxSound{ class SoundSource; }
21namespace OrxSound{ class SoundBuffer; }
[8514]22
23class TiXmlElement;
[8802]24class Animation3D;
[8514]25
26
27class GenericNPC : public NPC
28{
29 public:
[8811]30  GenericNPC();
[8514]31  GenericNPC(const TiXmlElement* root);
32  virtual ~GenericNPC ();
33
34  void init();
35  virtual void loadParams(const TiXmlElement* root);
36
37  void setAnimation(int animationIndex, int animPlaybackMode);
[8516]38  /** sets the sound volume to @param vol: volume of the sound */
39  inline void setVolume(float vol) { this->soundVolume = vol; }
[8514]40
[8705]41  void playAnimation(int animationIndex, int animPlaybackMode);
42
43  void playSound(std::string filename);
44  void playSound(int i);
45
[8793]46  float lookAt(WorldEntity* worldEntity);
47
[8783]48  float walkTo(const Vector& coordinate, const Quaternion& dir);
[8810]49  float walkTo(float x, float y, float z);
[8783]50  float walkTo(float x, float y, float z, float qu, float qx, float qy, float qz);
51  float walkTo(float x, float y, float qu, float qx, float qy, float qz);
[8514]52
[8783]53  float runTo(const Vector& coordinate, const Quaternion& dir);
54  float runTo(float x, float y, float z, float qu, float qx, float qy, float qz);
55  float runTo(float x, float y, float qu, float qx, float qy, float qz);
56
57  float crouchTo(const Vector& coordinate, const Quaternion& dir);
58  float crouchTo(float x, float y, float z, float qu, float qx, float qy, float qz);
59  float crouchTo(float x, float y, float qu, float qx, float qy, float qz);
60
[8796]61  float talkTo(WorldEntity* worldEntity, int dialogNr);
[8783]62
[8793]63
[8514]64  void destroy();
65
66  virtual void tick (float time);
67
68
69 private:
[8516]70   OrxSound::SoundSource                   soundSource;
71   OrxSound::SoundBuffer*                  soundBuffer;
72   float                                   soundVolume;
[8793]73
74   Vector                                  destCoor;
75   Quaternion                              destDir;
[8802]76
77   Animation3D*                            currentAnim;
[8514]78};
79
80#endif /* _GENERIC_ENTITY_H */
Note: See TracBrowser for help on using the repository browser.