| 46 | module.exports = (SpectateLevelView = (function () { |
| 47 | SpectateLevelView = class SpectateLevelView extends RootView { |
| 48 | static initClass () { |
| 49 | this.prototype.id = 'spectate-level-view' |
| 50 | this.prototype.template = template |
| 51 | this.prototype.cache = false |
| 52 | this.prototype.isEditorPreview = false |
| 53 | |
| 54 | this.prototype.subscriptions = { |
| 55 | 'level:set-volume' (e) { createjs.Sound.volume = e.volume === 1 ? 0.6 : e.volume }, // Quieter for now until individual sound FX controls work again. |
| 56 | 'god:new-world-created': 'onNewWorld', |
| 57 | 'god:streaming-world-updated': 'onNewWorld', |
| 58 | 'god:infinite-loop': 'onInfiniteLoop', |
| 59 | 'level:next-game-pressed': 'onNextGamePressed', |
| 60 | 'level:started': 'onLevelStarted', |
| 61 | 'level:loading-view-unveiled': 'onLoadingViewUnveiled', |
| 62 | 'level:session-will-save': 'onSessionWillSave' |
| 63 | } |
| 64 | |
| 65 | this.prototype.events = { |
| 66 | 'mouseenter .spectate-code': 'onMouseEnterSpectateCode', |
| 67 | 'mouseleave .spectate-code': 'onMouseLeaveSpectateCode' |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | constructor (options, levelID) { |
| 72 | super(options) |