mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-31 01:25:21 +00:00
fix non static volume
This commit is contained in:
@@ -12,6 +12,7 @@ namespace BBM
|
||||
_musicPath(musicPath),
|
||||
_music(RAY::Audio::Music(musicPath))
|
||||
{
|
||||
this->volume = 1;
|
||||
}
|
||||
|
||||
WAL::Component *MusicComponent::clone(WAL::Entity &entity) const
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace BBM
|
||||
//! @brief A Music component is not assignable
|
||||
MusicComponent &operator=(const MusicComponent &) = delete;
|
||||
//! @brief Volume of the muisc
|
||||
float volume = 1;
|
||||
static float volume;
|
||||
private:
|
||||
//! @brief music of this entity
|
||||
RAY::Audio::Music _music;
|
||||
|
||||
@@ -14,6 +14,7 @@ const std::map<SoundComponent::soundIndex, std::string> &soundPath)
|
||||
_soundIndex(IDLE),
|
||||
_soundPath(soundPath)
|
||||
{
|
||||
this->volume = 1;
|
||||
for (int i = 0; i <= DEATH; i++) {
|
||||
if (soundPath.at(static_cast<soundIndex>(i)).empty()) {
|
||||
this->_isLoad[static_cast<soundIndex>(i)] = false;
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace BBM
|
||||
//! @brief A Sound component is not assignable
|
||||
SoundComponent &operator=(const SoundComponent &) = delete;
|
||||
//! @brief Volume of the sounds
|
||||
float volume = 1;
|
||||
static float volume;
|
||||
|
||||
private:
|
||||
//! @brief Sounds of this entity
|
||||
|
||||
Reference in New Issue
Block a user