AudioService - SC-SGS/surviving-sarntal GitHub Wiki
This page gives an overview of how sound is played in the game.
The audio is controlled by the AudioService, which uses Raylib to play the sound effects and the music of the game. The AudioService uses the ResourceManager to load all the sound effects and the music in memory and make available for use once the game has been started.
In order to add a new sound/texture you will need to do the following.
- Add the new sound as a .wav ot .mp3 file to the `assets/audio` directory
- Add the sound to the configuration under `sound-effects` as
`sound-name: "../assets/audio/yourNewSound.wav"'
- After these steps you can use the new sound by calling the playSound method with the `sound-name` as parameter.