Files
Balazs Erseki 665d1454af Add audio/play_sound_effect example (#23219)
Add `audio/play_sound_effect` example

# Objective

Add an example that demonstrates how to load an audio file and play it
multiple times on a specific event (pressing space).

## Solution

It is similar to the breakout example, but way shorter and focused. This
example loads a sound effect as a resource with the `FromWorld` trait,
and on a keyboard event spawns an `AudioPlayer` with `DESPAWN` mode.

## Testing

- Built on top of 0.18.1, and moved to master
- Tested by building the examples, and pressing the space a few times
(no overlapping audio)
- Tested also by pressing space as fast as I could do for about 1
minute. Lot of components are spawned, played at the same time, but I've
found no issues.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2026-03-29 16:35:34 +00:00
..
2024-11-08 01:51:50 +00:00
2026-03-24 23:31:06 +00:00