-
My game has some "battle" sounds that should pause playing when the game is paused. Other "music" sounds should keep playing normally while the game is paused. My approach to this was to iterate over all the "battle" sounds and call I though of saving a list of sounds that were playing before the game was paused, and call What would be the best appoach? Cheers! EDIT: I have figured out that using a Now the problem I have is:
Should I iterate though all the child sounds of the "battleGroup" and call |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
You're correct in that you should use a group to do the starting/stopping. Stopping is essentially just a pause, so all your sounds that are linked to the group are still going to exist in their current state. If any sounds are no longer relevant because you've changed the state of the game (exited to the main menu in your example), you need to get rid of the sounds that are no longer relevant. |
Beta Was this translation helpful? Give feedback.
You're correct in that you should use a group to do the starting/stopping. Stopping is essentially just a pause, so all your sounds that are linked to the group are still going to exist in their current state. If any sounds are no longer relevant because you've changed the state of the game (exited to the main menu in your example), you need to get rid of the sounds that are no longer relevant.