megalanthusdefold-gamepush
megalanthus/defold-gamepush/gamepush.core.sounds
GamePush sounds: mute and unmute all sounds, effects or music, with their events.
- GitHub: megalanthus/defold-gamepush — pinned to
v1.4.1- Pick a release from megalanthus/defold-gamepush releases and add its Source code (zip) URL (or a packaged
.zipasset, if the library ships one) togame.projectunder[project]dependencies, then Fetch Libraries in the Defold editor. - Run
bunx @defold-typescript/cli resolveto materialize its types. - Import it under a namespace alias of your choice:
import * as core_sounds from "gamepush.core.sounds"
- Pick a release from megalanthus/defold-gamepush releases and add its Source code (zip) URL (or a packaged
Functions
is_muted(): boolean
Whether all sounds are muted.
Returns
boolean
is_sfx_muted(): boolean
Whether sound effects are muted.
Returns
boolean
is_music_muted(): boolean
Whether music is muted.
Returns
boolean
mute()
Mutes all sounds.
unmute()
Unmutes all sounds.
mute_sfx()
Mutes sound effects.
unmute_sfx()
Unmutes sound effects.
mute_music()
Mutes music.
unmute_music()
Unmutes music.
Variables
callbacks: SoundsCallbacks
The event handlers.
Types
SoundsCallbacks
SoundsCallbacks.mute?: () => void
All sounds were muted.
SoundsCallbacks.unmute?: () => void
All sounds were unmuted.
SoundsCallbacks.mute_sfx?: () => void
Sound effects were muted.
SoundsCallbacks.unmute_sfx?: () => void
Sound effects were unmuted.
SoundsCallbacks.mute_music?: () => void
Music was muted.
SoundsCallbacks.unmute_music?: () => void
Music was unmuted.