sound.h 926 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #pragma once
  2. #include <irrlicht/irrlicht.h>
  3. #include <nlohmann/json.hpp>
  4. #include "../object.h"
  5. namespace wp::core::objects
  6. {
  7. using json = nlohmann::json;
  8. class sound : object
  9. {
  10. public:
  11. static object* fromJSON (
  12. json data,
  13. bool visible,
  14. irr::u32 id,
  15. std::string name,
  16. const irr::core::vector3df& origin,
  17. const irr::core::vector3df& scale,
  18. const irr::core::vector3df& angles
  19. );
  20. void insertSound (std::string filename);
  21. std::vector<std::string>* getSounds ();
  22. protected:
  23. sound (
  24. bool visible,
  25. irr::u32 id,
  26. std::string name,
  27. const irr::core::vector3df& origin,
  28. const irr::core::vector3df& scale,
  29. const irr::core::vector3df& angles
  30. );
  31. private:
  32. std::vector<std::string> m_sounds;
  33. };
  34. }