[−][src]Module pokemon_rust::audio

Types related to BGM/SFX playback.

Structs

Music

A type responsible for controlling the current background music (BGM). BGMs are played in a loop as long as they aren't changed. Internally, it contains a storage with every loaded BGM file. Files can also be preloaded to be played later.

SoundKit

A type which implements SystemData that can be used to play sound effects (SFX) easily. This can be retrieved either via the SystemData of a System or directly from the world through SoundKit::fetch(world).

SoundStorage

A private storage for loaded sounds (SFX). This is an implementation detail of SoundKit.

Enums

AudioFileFormat

An enumeration with all supported audio file formats.

Sound

An enumeration with the possible sound effects of the game.

Functions

initialise_audio

Initialisation function for the audio module. Inserts a SoundStorage and a Music into the world as resources.