From 77524b907b0737d97094f8530ff29578ae396414 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Wed, 3 Jul 2013 17:56:06 -0400 Subject: imachine.js: add inter variables for clarity --- www/js/imachine.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/js/imachine.js b/www/js/imachine.js index 12a2f7a..8c2f86d 100644 --- a/www/js/imachine.js +++ b/www/js/imachine.js @@ -24,6 +24,8 @@ html5ks.imachine = (function () { this.run(inst); break; case "object": + var cmd = inst[0]; + var args = inst.slice(1); switch (inst[0]) { case "iscene": this.scene_register(inst[1]); @@ -33,7 +35,7 @@ html5ks.imachine = (function () { html5ks.api.movie_cutscene("op_1").then(runInst); break; default: - html5ks.api[inst[0]](inst[1]).then(runInst); + html5ks.api[cmd].apply(html5ks.api, args).then(runInst); } break; case "seen_scene": -- cgit v1.2.3-70-g09d2