SFML community forums
Bindings - other languages => DotNet => Topic started by: JohnStabler on January 31, 2012, 05:07:49 pm
-
What would be the best way of handling multiple Sound objects? For instance, if I have a laser sound effect that is triggered twice in quick succession, the second call to the Play method on the sound causes it to stop and then play from the beginning. I'd want both sounds to be playing at the same time.
Is there any problem with creating a Sound object instance on the fly and then immediately playing it? Will I need to keep a reference to the sound to keep it playing?
-
Will I need to keep a reference to the sound to keep it playing?
Yep, of course.
-
I guess i'll just have to maintain a collection of sounds that are playing and then prune it every so often of sounds that have finished?
-
Yes.