before attempt at flipping

This commit is contained in:
Peter Cottle 2013-01-05 22:28:59 -08:00
parent ca33b7ce1b
commit 9460c4b4c6
3 changed files with 28 additions and 15 deletions

View file

@ -330,19 +330,23 @@ var Level = Sandbox.extend({
},
startLevel: function(command, deferred) {
command.addWarning(
"You are in a level! You can't start a new one before exiting. I'll add the command for you..."
);
command.set('status', 'error');
this.exitLevel();
Main.getSandbox().startLevel(command, deferred);
/*
Main.getEventBaton().trigger('commandSubmitted',
'delay 3000; exit level; delay 500;' + command.get('rawStr')
);
deferred.resolve();
deferred.resolve();*/
},
exitLevel: function(command, deferred) {
this.die();
if (!command || !deferred) {
return;
}
setTimeout(function() {
command.finishWith(deferred);
}, this.getAnimationTime());