Play
Last updated
Was this helpful?
Last updated
Was this helpful?
The Play method can be used to play a , optionally specifying the volume to play at. The Play method performs the following additional logic:
It only plays the if is true.
It checks if the has already been played this frame, preventing the same from playing twice in one frame. This behavior depends on the value of .
It increments which can be used to measure how many times sound effects have played.
It checks if the argument has been disposed (debug only) and throws an informative exception if so.
The following assumes that Explosion is a . This can be created by adding a to Glue.
Sounds can be played with a custom volume: