Description:
Plays a sound effect that has been previously loaded using
AudioManager.load_sound(). Sound effects are designed for
short, low-latency audio such as UI clicks, player actions, or game events.
The loops parameter controls how many times the sound will
repeat after the initial playback.
from VertexEngine.audio import AudioManager
AudioManager.load_sound("jump", "assets/audio/jump.wav")
AudioManager.play_sound("jump")
AudioManager.play_sound("jump", loops=2)
name (str):
The name assigned to the sound when it was loaded. This identifier
is used by the AudioManager to locate and play the sound effect.
loops (int):
Number of additional times the sound should repeat after the first
playback. Use 0 to play once, or higher values for repeated
playback. Unlike music, sound effects typically do not loop infinitely.
None — This method triggers sound playback but does not return a value.