annotate webGL/dandy/resources/keybord.js @ 12:61febc94fa62

upload dandy4.html,new xmlFile
author NOBUYASU Oshiro
date Thu, 15 Jul 2010 07:08:37 +0900
parents 680b5b0cd1e4
children 4684e849866c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
1 function keybordDown()
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
2 {
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
3 var code = event.keyCode;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
4 if(code == KEY_D) {}
12
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
5 if(code == KEY_E) { pad.r1 = 1; }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
6 if(code == KEY_R) { pad.r2 = 1; }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
7 if(code == KEY_A) { pad.k0 = 1; }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
8 if(code == KEY_Z) { pad.k1 = 1; }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
9 if(code == KEY_S) { pad.k3 = 1; }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
10 if(code == KEY_X) { pad.k4 = 1; }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
11 if(code == KEY_W) { pad.l1 = 1; }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
12 if(code == KEY_Q) { pad.l2 = 1; }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
13 if(code == LEFT_ARROW) { pad.left += 0.5; pad.count++; }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
14 if(code == RIGHT_ARROW) { pad.right += 0.5; pad.count++; }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
15 if(code == UP_ARROW) { pad.up += 1; }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
16 if(code == DOWN_ARROW) { pad.down += 1; }
11
NOBUYASU Oshiro
parents: 8
diff changeset
17 if(code == ENTER) pad.start = 1;
7
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
18 }
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
19 function keybordPress()
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
20 {
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
21
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
22 }
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
23 function keybordUp()
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
24 {
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
25 var code = event.keyCode;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
26 if(code == KEY_D) {}
12
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
27 if(code == KEY_A) { pad.k0 = 0; }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
28 if(code == KEY_W) { pad.l1 = 0; }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
29 if(code == KEY_R) { pad.r2 = 0; }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
30 if(code == KEY_E) { pad.r1 = 0; }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
31 if(code == KEY_S) { pad.k3 = 0; }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
32 if(code == KEY_Z) { pad.k1 = 0; }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
33 if(code == KEY_X) { pad.k4 = 0; }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
34 if(code == KEY_Q) { pad.l2 = 0; }
7
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
35 if(code == LEFT_ARROW) pad.left = 0;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
36 if(code == RIGHT_ARROW) pad.right = 0;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
37 if(code == UP_ARROW) pad.up = 0;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
38 if(code == DOWN_ARROW) pad.down = 0;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
39
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
40 pad.state=0;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
41 pad.count=0;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
42 }