チェンジセット 78: kuy/as2/sample/KeyIf

差分発生行の前後
無視リスト:
コミット日時:
2007/09/15 18:24:49 (5 年前)
コミッタ:
kuy
ログメッセージ:

KeyIf?.as 0.2.0 Keyクラスで定義されていないキーコード指定にも対応。
Delay.as 0.1.0 初版。サンプルで必要になったので。

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • kuy/as2/sample/KeyIf/Main.as

    r77 r78  
    11import net.endflow.util.KeyIf; 
     2import net.endflow.util.Delay; 
    23 
    34var ship:Ship = new Ship(_root); 
     
    89        LEFT: function(){ship.left()}, 
    910        RIGHT: function(){ship.right()}, 
    10         SPACE: {CONTROL: function(){ship.shot()}}, 
     11        SPACE: {CONTROL: {_90: function(){ship.shot()}}}, 
    1112        PGUP: [function(){ship.up()}, function(){ship.shot()}], 
    1213        PGDN: [function(){ship.down()}, function(){ship.shot()}], 
    13         HOME: function(){ship.reset()} 
     14        HOME: {_82: function(){ship.reset()}}, 
     15        _88: function(){ 
     16                ship.shot(); 
     17                Delay.f(function(){ 
     18                        ship.shot(); 
     19                        Delay.f(function(){ 
     20                                ship.shot(); 
     21                        }, 200); 
     22                }, 200); 
     23        } 
    1424});