diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2013-07-03 17:56:06 -0400 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2013-07-03 17:56:06 -0400 |
commit | 77524b907b0737d97094f8530ff29578ae396414 (patch) | |
tree | 27a45f5afe680fe9169c1b6dbab3f07840afe9ed /www/js | |
parent | f131bec0086dd1ed19645051112204f7bda0ad45 (diff) | |
download | html5ks-77524b907b0737d97094f8530ff29578ae396414.tar.xz html5ks-77524b907b0737d97094f8530ff29578ae396414.zip |
imachine.js: add inter variables for clarity
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/imachine.js | 4 |
1 files changed, 3 insertions, 1 deletions
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": |