yay ok working

This commit is contained in:
Peter Cottle 2013-01-05 15:53:42 -08:00
parent ebdf188c1d
commit eb33897a22
6 changed files with 166 additions and 17 deletions

View file

@ -331,11 +331,22 @@ var Level = Sandbox.extend({
return instants;
},
exitLevel: function(command, deferred) {
this.die();
setTimeout(function() {
command.finishWith(deferred);
}, this.getAnimationTime());
// we need to fade in the sandbox
Main.getEventBaton().trigger('levelExited');
},
processLevelCommand: function(command, defer) {
var methodMap = {
'show goal': this.showGoal,
'hide goal': this.hideGoal,
'show solution': this.showSolution
'show solution': this.showSolution,
'exit level': this.exitLevel
};
var method = methodMap[command.get('method')];
if (!method) {