Interface IAudioHandler
- Namespace
- Fallencake.UI.Audio
- Assembly
- Fallencake.UI.dll
Base interface for managing sounds in UI components. Provides access to audio device and toggles plus basic event-driven playback.
public interface IAudioHandler
Properties
AudioSource
Audio source for playing sounds.
AudioSource AudioSource { get; set; }
Property Value
- AudioSource
EnableSounds
Whether sounds are enabled for the component.
bool EnableSounds { get; set; }
Property Value
- bool
Volume
Volume for sound playback.
float Volume { get; set; }
Property Value
- float
Methods
PlayDeselectSound()
Play sound when deselected.
void PlayDeselectSound()
PlayPressSound()
Play sound when pressed.
void PlayPressSound()
PlaySelectSound()
Play sound when hovered.
void PlaySelectSound()
UpdateInteractable(bool)
Updates the interactable state of the UI component.
void UpdateInteractable(bool isInteractable)
Parameters
isInteractableboolWhether the component should be interactable.