/*! * @file generic_npc.h * generic npc object */ #ifndef _GENERIC_ENTITY_H #define _GENERIC_ENTITY_H #include "npc.h" #include // #include "sound_source.h" namespace OrxSound{ class SoundSource; } namespace OrxSound{ class SoundBuffer; } class TiXmlElement; class GenericNPC : public NPC { public: GenericNPC(const TiXmlElement* root); virtual ~GenericNPC (); void init(); virtual void loadParams(const TiXmlElement* root); void setAnimation(int animationIndex, int animPlaybackMode); /** sets the sound volume to @param vol: volume of the sound */ inline void setVolume(float vol) { this->soundVolume = vol; } void playAnimation(int animationIndex, int animPlaybackMode); void playSound(std::string filename); void playSound(int i); bool walkTo(const Vector& coordinate, float time); bool walkTo(float x, float y, float z, float time); void destroy(); virtual void tick (float time); private: OrxSound::SoundSource soundSource; OrxSound::SoundBuffer* soundBuffer; float soundVolume; }; #endif /* _GENERIC_ENTITY_H */