()
| 131 | } |
| 132 | |
| 133 | fun () { |
| 134 | if ((this.spade.speed === 8) && this.spade.playback) { |
| 135 | if (utils.isCodeCombat) { |
| 136 | me.set('music', true) |
| 137 | me.set('volume', 1) |
| 138 | if (!this.musicPlayer) { |
| 139 | const musicFile = 'https://archive.org/download/BennyHillYaketySax/MusicaDeCirco-BennyHill.mp3' |
| 140 | this.musicPlayer = new MusicPlayer() |
| 141 | return Backbone.Mediator.publish('music-player:play-music', { play: true, file: musicFile }) |
| 142 | } |
| 143 | } else { |
| 144 | return store.dispatch('audio/playSound', { |
| 145 | track: 'background', |
| 146 | loop: true, |
| 147 | src: 'https://archive.org/download/BennyHillYaketySax/MusicaDeCirco-BennyHill.mp3' |
| 148 | }) |
| 149 | } |
| 150 | } else if (utils.isCodeCombat) { |
| 151 | if (this.musicPlayer != null) { |
| 152 | this.musicPlayer.destroy() |
| 153 | } |
| 154 | return this.musicPlayer = undefined |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | onSpeedButtonClicked (e) { |
| 159 | this.spade.speed = $(e.target).data('speed') |
no test coverage detected