Implementing the sound system

With both sound emitter and sound listener components out of the way, we have a green light to begin implementing the sound system that is going to bring all of this code to life. Let's get it started!

class S_Sound : public S_Base{ public: S_Sound(SystemManager* l_systemMgr); ~S_Sound(); void Update(float l_dT); void HandleEvent(const EntityId& l_entity, const EntityEvent& l_event); void Notify(const Message& l_message); void SetUp(AudioManager* l_audioManager, SoundManager* l_soundManager); private: sf::Vector3f MakeSoundPosition(const sf::Vector2f& l_entityPos, unsigned int l_elevation); void EmitSound(const EntityId& l_entity, const EntitySound& l_sound, bool l_useId, bool l_relative, int l_checkFrame = -1); AudioManager* ...

Get SFML Game Development By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.