Mountain  1.0.0
Simple C++ 2D Game Framework
audio_listener.hpp
1 #pragma once
2 
3 #include "Mountain/core.hpp"
4 
5 #include <Maths/vector3.hpp>
6 
7 #include "Mountain/scene/component/component.hpp"
8 
9 namespace Mountain
10 {
11  class MOUNTAIN_API AudioListener : public Component
12  {
13  public:
14  bool_t dopplerEffect = false;
15 
16  void Update() override;
17 
19  [[nodiscard]]
20  float_t GetVolume() const;
21 
23  void SetVolume(float_t newVolume);
24 
25  private:
27  float_t m_Volume = 1.f;
28 
29  Vector2 m_LastPosition;
30  };
31 }
Represents a behavior that can be attached to an Entity.
Definition: component.hpp:10
Contains all declarations of the Mountain Framework.
Definition: audio.hpp:22