kyototycoon play_scriptをphpから利用する。

前回 play_scriptの部分を書く前だったので play_scriptの部分を

資料
[http://fallabs.com/kyototycoon/spex.html]

/rpc/play_script
Call a procedure of the script language extension.
input: name: the name of the procedure to call.
input: (optional): arbitrary records whose keys trail the character “_”.
output: (optional): arbitrary keys which trail the character “_”.
status code: 200, 450 (arbitrary logical error).

ということで、前のクラスにplay_scriptを追加

 public function play_script($name, $inmap){
   $api = $this->baseUrl.’play_script';
   $params = array(
   ‘name’=>$name
   );
   foreach($inmap as $k=>$v){
     $params['_'.$k] = $v;
   }
   return $this->post($api, $params);
 }

これで無事完成。

This entry was posted on 日曜日, 7月 15th, 2012 at 5:51 PM and is filed under Kyototycoon/cabinet. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android
https://itunes.apple.com/jp/app/lost-knight-3d-action/id900917032
https://play.google.com/store/apps/details?id=com.groundroad.runknight

各種開発支援・機能開発等小さいお仕事などもお請けしております。
unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発
お気軽にお問い合わせください
大崎・五反田近郊での対面でのお打ち合わせはいつでも可能です。