jetlag2d
    Preparing search index...

    Class MusicLayers

    MusicLayers is a set of named MusicComponents that can play at the same time, such as a main theme, an ambient loop, and a playlist

    Putting a MusicComponent into a name that already holds one stops the old one first, so a game never ends up with a track that it can no longer reach.

    Index
    • Stop the MusicComponent in a layer, and empty the layer

      Parameters

      • name: string

        The name of the layer

      Returns void

    • Put a MusicComponent into a layer, stopping whatever was there before

      Parameters

      • name: string

        The name of the layer

      • music: MusicComponent

        The MusicComponent that should now occupy the layer

      • start: boolean = true

        Should the new music start playing right away? (default true)

      Returns void