Files
shweets-sim/src/resource/xml/sound_entry.hpp
shweet 17f3348e94
Some checks failed
Build / Build Game (push) Has been cancelled
The Mega Snivy Update
2026-02-28 21:48:00 -05:00

25 lines
416 B
C++

// Handles sound entries in .xml files. "Weight" value determines weight of being randomly selected.
#pragma once
#include "../audio.hpp"
namespace game::resource::xml
{
class SoundEntry
{
public:
Audio sound{};
float weight{1.0f};
inline void play() { sound.play(); };
};
class SoundEntryCollection : public std::vector<SoundEntry>
{
public:
Audio& get();
void play();
};
}