summaryrefslogtreecommitdiff
path: root/js/codeq/stateMachine.js
diff options
context:
space:
mode:
authorRobert Zorko <robertz@gurucue.com>2015-09-18 09:42:52 +0200
committerRobert Zorko <robertz@gurucue.com>2015-09-18 09:42:52 +0200
commit7009ae2c2dca4b70e903135f088a15acb95f5085 (patch)
treea30568fbc1a49d8a9dc1f261783c50e60b02e11f /js/codeq/stateMachine.js
parent9fde9cb6cbb628fb882101385009d3b9387dc33d (diff)
added python and prolog into two different states
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