MCPcopy Create free account
hub / github.com/codecombat/codecombat / initClass

Method initClass

app/views/play/SpectateView.js:48–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46module.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)

Callers 1

SpectateView.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected