Skip to content
Snippets Groups Projects
channels.rs 1.32 KiB
Newer Older
Louis's avatar
Louis committed
use bevy::prelude::Resource;

Louis's avatar
Louis committed
/// The channel used for playing main background music tracks. When a track is started in this
/// channel, the currently playing track (if it exist) will be stopped. Tweens can be applied to
/// control this transition
///
/// - *Volume Type:* Music
/// - *Supports Concurrent Sounds:* No
/// - *Supports Transitions*: Yes
Louis's avatar
Louis committed
#[derive(Resource)]
Louis's avatar
Louis committed
pub struct MusicAudioChannel;
/// The channel used for playing an ambient background track. An ambient background track can
/// be considered similar to a music track, but consisting of composite sound effects to create
/// a certain feeling, often boosting immersion.
///
/// - *Volume Type:* SFX
/// - *Supports Concurrent Sounds:* No
/// - *Supports Transitions*: Yes
Louis's avatar
Louis committed
#[derive(Resource)]
Louis's avatar
Louis committed
pub struct AmbianceAudioChannel;
/// The channel used for generic one shot sound effects, such as spells, hits, attacks, grunts, etc.
///
/// - *Volume Type:* SFX
/// - *Supports Concurrent Sounds:* Yes
/// - *Supports Transitions:* Yes
Louis's avatar
Louis committed
#[derive(Resource)]
pub struct SfxAudioChannel;
Louis's avatar
Louis committed
/// The channel used for any UI related one-shot sound effects. The volume of ui sfx can be
/// controlled separately from game related sound effects
///
/// - *Volume Type:* UI SFX
/// - *Supports Concurrent Sounds:* Yes
/// - *Supports Transitions:* Yes
Louis's avatar
Louis committed
#[derive(Resource)]
pub struct UiSfxAudioChannel;