Fixed a bug with the simulator due to the changes made to the supermodel.

This commit is contained in:
Scott Erickson 2014-05-14 11:13:36 -07:00
parent 0be813e424
commit 09fbfdb360
2 changed files with 2 additions and 1 deletions

View file

@ -74,7 +74,7 @@ module.exports = class Simulator extends CocoClass
return return
@supermodel ?= new SuperModel() @supermodel ?= new SuperModel()
@supermodel.resetProgress()
@levelLoader = new LevelLoader supermodel: @supermodel, levelID: levelID, sessionID: @task.getFirstSessionID(), headless: true @levelLoader = new LevelLoader supermodel: @supermodel, levelID: levelID, sessionID: @task.getFirstSessionID(), headless: true
if @supermodel.finished() if @supermodel.finished()
@simulateGame() @simulateGame()

View file

@ -162,6 +162,7 @@ module.exports = class SuperModel extends Backbone.Model
@trigger('loaded-all') if @finished() @trigger('loaded-all') if @finished()
setMaxProgress: (@maxProgress) -> setMaxProgress: (@maxProgress) ->
resetProgress: -> @progress = 0
clearMaxProgress: -> clearMaxProgress: ->
@maxProgress = 1 @maxProgress = 1
_.defer @updateProgress _.defer @updateProgress