mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-27 14:33:59 -04:00
Don't start drawing Surface until needed.
This commit is contained in:
parent
db9a82d58a
commit
73222a1a98
1 changed files with 4 additions and 4 deletions
|
@ -185,10 +185,6 @@ module.exports = class PlayLevelView extends View
|
|||
@levelLoader = null
|
||||
@initSurface()
|
||||
@initScriptManager()
|
||||
@surface.showLevel()
|
||||
if @otherSession
|
||||
# TODO: colorize name and cloud by team, colorize wizard by user's color config
|
||||
@surface.createOpponentWizard id: @otherSession.get('creator'), name: @otherSession.get('creatorName'), team: @otherSession.get('team')
|
||||
|
||||
grabLevelLoaderData: ->
|
||||
@session = @levelLoader.session
|
||||
|
@ -215,6 +211,10 @@ module.exports = class PlayLevelView extends View
|
|||
@session.set 'multiplayer', false
|
||||
|
||||
onLevelStarted: (e) ->
|
||||
@surface.showLevel()
|
||||
if @otherSession
|
||||
# TODO: colorize name and cloud by team, colorize wizard by user's color config
|
||||
@surface.createOpponentWizard id: @otherSession.get('creator'), name: @otherSession.get('creatorName'), team: @otherSession.get('team')
|
||||
@loadingView?.unveil()
|
||||
|
||||
onLoadingViewUnveiled: (e) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue