DestinationSol
DestinationSol copied to clipboard
ECS wrapper for the sound system
Description
This is an ECS-based method for playing sounds. It makes use of the existing OggSoundManager, but adds support for entities. It also adds a MaterialType enum, currently only used for determining which sounds to play. In addition, it removes the duplicate, unused classes from game/sounds, which were identical to classes with the same names in assets/sounds.
There are three types of sound-playing added:
- If an entity takes damage, if there is a specified damage sound for the type of damage and the material of the entity, a sound will be played.
- When an entity experiences a collision, a collision sound is played based on the entity's type of material.
- If a specific sound should be played, a
SoundEventcan be sent.
This PR also adds in Asteroid's AsteroidCrack sound, which is the sound played when an asteroid gets destroyed.
Testing
- Collide with the golden asteroid. It should make a sound when collided with.
- Shoot the asteroid. It should make a sound when it gets destroyed (make sure your volume is on! it may need to be on max)
I wasn't able to test the collision sound locally (my setup has a few issues for me to work out), so that one especially needs testing.