summaryrefslogtreecommitdiff
path: root/js/codeq/stateMachine.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/codeq/stateMachine.js')
-rw-r--r--js/codeq/stateMachine.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/codeq/stateMachine.js b/js/codeq/stateMachine.js
index 12332c4..cfb27e7 100644
--- a/js/codeq/stateMachine.js
+++ b/js/codeq/stateMachine.js
@@ -8,7 +8,7 @@ codeq.makeStateMachine = function(def){
'transition': function(name){
if(currState !== null) currState.exit();
currState = def[name];
- currState.enter();
+ currState.enter.apply(currState,Array.prototype.slice.apply(arguments,[1]));
},
'destroy': function(){
if(currState !== null) currState.exit();
@@ -19,4 +19,4 @@ codeq.makeStateMachine = function(def){
}
}
};
-codeq.globalStateMachine = codeq.makeStateMachine({});
+codeq.globalStateMachine = codeq.makeStateMachine({}); \ No newline at end of file