dist/carrot.js
/**
     * Plays a sound. If the sound is already playing, restart it.
     *
     * @method Carrot.SoundManager#play
     */
Plays a sound. If the sound is already playing, restart it.
Plays a sound . If the sound is already playing restart it .
play(key, volume, loop)
    {
        let file = this.game.cache.sounds[key];
        if (file)
        {
            if (loop !== undefined)
            {
                file.loop = loop;
            }
            file.volume = volume;
            if (! file.paused)
            {
                file.pause();
                file.currentTime = 0;
                file.play();
            }
            else
            {
                file.play();
            }
        }
    }
play ( key , volume , loop ) { let file = this . game . cache . sounds [ key ] ; if ( file ) { if ( loop !== undefined ) { file . loop = loop ; } file . volume = volume ; if ( ! file . paused ) { file . pause ( ) ; file . currentTime = 0 ; file . play ( ) ; } else { file . play ( ) ; } } }
Plays a sound.
Plays a sound .
// Music?