Changeset 92 for pycodeshooter/trunk/shooter/action.js
- Timestamp:
- 01/12/11 18:39:31 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pycodeshooter/trunk/shooter/action.js
r81 r92 21 21 const ACTION_DELAY = 32; 22 22 const SWITCH_BULLET = 1; 23 const SWITCH_BOMB = 2; 23 24 var currentAction = 0; 24 25 var currentSwitch = 0; … … 57 58 function getSwitchByCharCode(charCode) { 58 59 switch(charCode) { 60 case 97: // a 61 return SWITCH_BOMB; 59 62 case 99: // c 60 63 return SWITCH_BULLET; … … 106 109 this.index = 0; 107 110 unsetSwitch(SWITCH_BULLET); 111 } 112 if (isSetSwitch(SWITCH_BOMB)) { 113 trooper.addBomb(); 114 unsetSwitch(SWITCH_BOMB); 108 115 } 109 116 if (isInAction(ACTION_SHOT))
Note: See TracChangeset
for help on using the changeset viewer.