The method of implementation of sound effects in pull request #149, although functional, could use refactoring to ensure scalability in the event we have to add or modify a large amount of sound effects.
Currently, each sound effect is stored in their own property in the ig.game namespace and the volume for each is individually set for each sound effect.
This can be improved by storing the sound effects in ig.music as a track and allowing the engine to handle it. In addition, by doing so, it allows the engine to configure the volume and any other code configuration of all sound effects in the track with minimal effort.
The method of implementation of sound effects in pull request #149, although functional, could use refactoring to ensure scalability in the event we have to add or modify a large amount of sound effects.
Currently, each sound effect is stored in their own property in the ig.game namespace and the volume for each is individually set for each sound effect.
This can be improved by storing the sound effects in ig.music as a track and allowing the engine to handle it. In addition, by doing so, it allows the engine to configure the volume and any other code configuration of all sound effects in the track with minimal effort.