[][src]Module rust_action_heroes::audio

We make one sound in the whole game

Structs

Sounds

The Sounds struct holds all of the sound effects (again, only one) and if sound is muted.

Constants

MOVE_SOUND

The path to our sound file is hard coded because there is only one. I'm sure if we had more sounds to deal with there would be some way of cataloging and loading them.

Functions

initialize_audio

Inserts our Sounds struct into the world so we can access it as a resource later.

load_audio

Loads a given audio file and returns a handle.

play_move_sound

Helper function to play the move sound. We use this in the MoveSound System.

toggle_mute

Another helper function to toggle global mute.