mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Add destroy method
This commit is contained in:
parent
fb9998b15e
commit
0cb92582f4
1 changed files with 9 additions and 0 deletions
|
@ -80,3 +80,12 @@ module.exports = class PlayGameDevLevelView extends RootView
|
|||
Backbone.Mediator.publish('playback:real-time-playback-started', {})
|
||||
Backbone.Mediator.publish('level:set-playing', {playing: true})
|
||||
@state.set('playing', true)
|
||||
|
||||
destroy: ->
|
||||
@levelLoader?.destroy()
|
||||
@surface?.destroy()
|
||||
@god?.destroy()
|
||||
@goalManager?.destroy()
|
||||
@scriptManager?.destroy()
|
||||
delete window.world # not sure where this is set, but this is one way to clean it up
|
||||
super()
|
||||
|
|
Loading…
Reference in a new issue