From 7009ae2c2dca4b70e903135f088a15acb95f5085 Mon Sep 17 00:00:00 2001 From: Robert Zorko Date: Fri, 18 Sep 2015 09:42:52 +0200 Subject: added python and prolog into two different states --- js/codeq/stateMachine.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/codeq/stateMachine.js') 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 -- cgit v1.2.1