Skip to Content
defold-typescript libraries
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
    1. Pick a release from megalanthus/defold-gamepush releases and add its Source code (zip) URL (or a packaged .zip asset, if the library ships one) to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Run bunx @defold-typescript/cli resolve to materialize its types.
    3. Import it under a namespace alias of your choice:
      import * as core_sounds from "gamepush.core.sounds"

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.

On this page