MCPcopy Index your code
hub / github.com/codecombat/codecombat / onLevelLoaderLoaded

Method onLevelLoaderLoaded

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

Source from the content-addressed store, hash-verified

158 }
159
160 onLevelLoaderLoaded () {
161 this.grabLevelLoaderData()
162 // at this point, all requisite data is loaded, and sessions are not denormalized
163 const team = 'humans'
164 this.loadOpponentTeam(team)
165 this.god.setLevel(this.level.serialize({ supermodel: this.supermodel, session: this.session, otherSession: this.otherSession, headless: false, sessionless: false }))
166 this.god.setLevelSessionIDs(this.otherSession ? [this.session.id, this.otherSession.id] : [this.session.id])
167 this.god.setWorldClassMap(this.world.classMap)
168 this.setTeam(team)
169 this.initSurface()
170 this.initGoalManager()
171 this.initScriptManager()
172 this.insertSubviews()
173 this.initVolume()
174 this.initSpectateCode()
175
176 this.originalSessionState = $.extend(true, {}, this.session.get('state'))
177 this.register()
178 this.controlBar.setBus(this.bus)
179 return this.surface.showLevel()
180 }
181
182 grabLevelLoaderData () {
183 this.session = this.levelLoader.session

Callers 1

onLoadedMethod · 0.95

Calls 13

grabLevelLoaderDataMethod · 0.95
loadOpponentTeamMethod · 0.95
setTeamMethod · 0.95
initSurfaceMethod · 0.95
initGoalManagerMethod · 0.95
initScriptManagerMethod · 0.95
insertSubviewsMethod · 0.95
initVolumeMethod · 0.95
initSpectateCodeMethod · 0.95
registerMethod · 0.95
serializeMethod · 0.80
setLevelMethod · 0.45

Tested by

no test coverage detected