mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-06 21:27:37 +00:00
remove empty ctor for SoundComponent
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
namespace BBM
|
||||
{
|
||||
SoundComponent::SoundComponent(WAL::Entity &entity, \
|
||||
std::map<SoundComponent::soundIndex, std::string> &soundPath)
|
||||
const std::map<SoundComponent::soundIndex, std::string> &soundPath)
|
||||
: WAL::Component(entity),
|
||||
_soundIndex(IDLE),
|
||||
_soundPath(soundPath)
|
||||
@@ -24,15 +24,9 @@ std::map<SoundComponent::soundIndex, std::string> &soundPath)
|
||||
}
|
||||
}
|
||||
|
||||
SoundComponent::SoundComponent(WAL::Entity &entity)
|
||||
: Component(entity),
|
||||
_soundList(),
|
||||
_soundIndex()
|
||||
{}
|
||||
|
||||
WAL::Component *SoundComponent::clone(WAL::Entity &entity) const
|
||||
{
|
||||
return new SoundComponent(entity);
|
||||
return new SoundComponent(entity, this->_soundPath);
|
||||
}
|
||||
|
||||
void SoundComponent::playSound()
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace BBM
|
||||
//! @inherit
|
||||
WAL::Component *clone(WAL::Entity &entity) const override;
|
||||
//! @brief Create a new SoundComponent at a certain Sound
|
||||
SoundComponent(WAL::Entity &entity, std::map<soundIndex, std::string> &);
|
||||
explicit SoundComponent(WAL::Entity &entity, const std::map<soundIndex, std::string> &);
|
||||
//! @brief A Sound component is copy constructable
|
||||
SoundComponent(const SoundComponent &) = default;
|
||||
//! @brief A default destructor
|
||||
@@ -63,16 +63,11 @@ namespace BBM
|
||||
|
||||
std::map<soundIndex, bool> _isLoad;
|
||||
|
||||
std::map<soundIndex, std::string> _soundPath;
|
||||
const std::map<soundIndex, std::string> _soundPath;
|
||||
|
||||
//! SoundIndex
|
||||
soundIndex _soundIndex;
|
||||
|
||||
|
||||
//! @brief Create a new SoundComponent linked to a specific entity
|
||||
explicit SoundComponent(WAL::Entity &entity);
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace BBM
|
||||
Reference in New Issue
Block a user