annotate webGL/dandy/resources/collision.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 collision_detect()
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
2 {
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
3 for(var i = 0; Boolean(active_chara_list.enemy[i]) ; i++)
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
4 {
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
5 var p = active_chara_list.enemy[i];
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
6 if(p.flag == true)
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
7 {
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
8 p = p.collision(p);
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
9 }
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
10 }
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
11 }
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
12
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
13
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
14 atari = function collision(p)
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
15 {
12
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
16 var i1=0;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
17 var i2=0;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
18 var n = 0;
7
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
19 var ex = p.x;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
20 var ey = p.y;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
21 var charano = p.charano;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
22 var w = p.w;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
23 var h = p.h;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
24
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
25 //自機やられ
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
26 if ((ex < jiki.x + jiki.w /2 ) && (ex + w > jiki.x + jiki.w /2)
11
NOBUYASU Oshiro
parents: 7
diff changeset
27 && ( ey < jiki.y + jiki.h / 2) && (ey + h > jiki.y + jiki.h / 2)
NOBUYASU Oshiro
parents: 7
diff changeset
28 && (jiki.muteki <= 0))
7
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
29 {
11
NOBUYASU Oshiro
parents: 7
diff changeset
30 Bom(jiki.x,jiki.y);
NOBUYASU Oshiro
parents: 7
diff changeset
31
7
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
32 jiki.bf = false;
11
NOBUYASU Oshiro
parents: 7
diff changeset
33
7
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
34 jiki.zanki--;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
35 jiki.muteki = 120;
11
NOBUYASU Oshiro
parents: 7
diff changeset
36 // jiki.muteki = 0;
7
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
37
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
38 /*
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
39 infg.stg = 0;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
40 infg_level--;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
41 if ( infg_level < 0)
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
42 infg_level = 0;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
43 */
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
44
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
45 return p;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
46 }
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
47
12
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
48 /*玉レベル1の当たり判定-------------------------*/
7
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
49 // for (var i1 = 0; tama_lv1[i1]; i1++) {
12
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
50 for ( i1 = 0; i1 < tama_lv1_end + 1; i1++) {
7
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
51 if ((tama_lv1[i1].x + w/2 > ex )
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
52 && ( ex + w > tama_lv1[i1].x + bullets[1].w)
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
53 && (tama_lv1[i1].y + jiki.w > ey) && (tama_lv1[i1].y < ey + h)
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
54 && (tama_lv1[i1].r != -1)) {
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
55 tama_lv1[i1].r = -1;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
56 p.vit -= TAMALV1P;
12
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
57 infg.stg += 4;
7
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
58 if (p.vit <= 0) {
12
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
59 infg.stg += 4;
11
NOBUYASU Oshiro
parents: 7
diff changeset
60 Bom(p.x, p.y);
7
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
61 // enemycount += (p.score * ((infg.stg / 128) + infg_level + 1));
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
62 p.state = delete_chara;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
63 p.collision= noaction;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
64 p.flag = false;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
65 return p;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
66 }
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
67 }
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
68 if ((tama_lv1[i1].x + w > ex ) && (ex + w/2 > tama_lv1[i1].x)
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
69 && (tama_lv1[i1].y + jiki.w > ey) && (tama_lv1[i1].y < ey +h)
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
70 && (tama_lv1[i1].l != -1)) {
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
71 tama_lv1[i1].l = -1;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
72 p.vit -= TAMALV1P;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
73
12
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
74 infg.stg++;
7
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
75 if (p.vit <= 0) {
12
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
76 infg.stg += 4;
11
NOBUYASU Oshiro
parents: 7
diff changeset
77 Bom(p.x, p.y);
7
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
78 // enemycount += (p.score * ((infg.stg / 128) + infg_lvel + 1));
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
79 p.state = delete_chara;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
80 p.collision = noaction;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
81 p.flag = false;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
82 return p;
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
83 }
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
84 }
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
85 }
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
86
12
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
87 /*玉レベル2--------------------------------*/
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
88 for(i1 = 0; i1 < tama_lv2_end + 1; i1++) {
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
89 if((tama_lv2[i1].x + 10 + bullets[4].w/2 > ex - w/2 )
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
90 && (ex + w/2 > tama_lv2[i1].x + 10 - bullets[4].w/2)
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
91 && (tama_lv2[i1].y + bullets[4].h/2 > ey - h/2 )
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
92 && (tama_lv2[i1].y - bullets[4].h/2 < ey + h/2)
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
93 && (tama_lv2[i1].rr != -1)) {
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
94 tama_lv2[i1].rr = -1;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
95 p.vit -= TAMALV2P;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
96 infg.stg++;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
97 if(p.vit <= 0) {
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
98 infg.stg += 4;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
99 Bom(p.x, p.y);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
100 // enemycount += (p.score * ((infg.stg / 128) + infg_level + 1));
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
101 p.state = delete_chara;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
102 p.collision = noaction;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
103 p.f = false;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
104 return p;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
105 }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
106 }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
107
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
108 if((tama_lv2[i1].x + 5 + bullets[4].w/2 > ex - w/2 )
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
109 && (ex + w/2 > tama_lv2[i1].x + 5 - bullets[4].w/2)
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
110 && (tama_lv2[i1].y + bullets[4].h/2 > ey - h/2 )
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
111 && (tama_lv2[i1].y - bullets[4].h/2 < ey + h/2)
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
112 && (tama_lv2[i1].sr != -1)) {
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
113 tama_lv2[i1].sr = -1;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
114 p.vit -= TAMALV2P;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
115 infg.stg++;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
116 if(p.vit <= 0) {
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
117 infg.stg += 4;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
118 Bom(p.x, p.y);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
119 // enemycount += (p.score * ((infg.stg / 128) + infg_level + 1));
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
120 p.state = delete_chara;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
121 p.collision = noaction;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
122 p.f = false;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
123 return p;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
124 }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
125 }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
126 if((tama_lv2[i1].x - 10 + bullets[4].w/2 > ex - w/2 )
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
127 && (ex + w/2 > tama_lv2[i1].x - 10 - bullets[4].w/2)
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
128 && (tama_lv2[i1].y + bullets[4].h/2 > ey - h/2 )
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
129 && (tama_lv2[i1].y - bullets[4].h/2 < ey + h/2)
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
130 && (tama_lv2[i1].ll != -1)) {
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
131 tama_lv2[i1].ll = -1;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
132 p.vit -= TAMALV2P;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
133 infg.stg++;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
134 if(p.vit <= 0) {
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
135 infg.stg += 4;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
136 Bom(p.x, p.y);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
137 // enemycount += (p.score * ((infg.stg / 128) + infg_level + 1));
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
138 p.state = delete_chara;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
139 p.collision = noaction;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
140 p.f = false;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
141 return p;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
142 }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
143 }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
144
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
145 if((tama_lv2[i1].x - 5 + bullets[4].w/2 > ex - w/2 )
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
146 && (ex + w/2 > tama_lv2[i1].x - 5 - bullets[4].w/2)
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
147 && (tama_lv2[i1].y + bullets[4].h/2 > ey - h/2 )
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
148 && (tama_lv2[i1].y - bullets[4].h/2 < ey + h/2)
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
149 && (tama_lv2[i1].sl != -1)) {
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
150 tama_lv2[i1].sl = -1;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
151 p.vit -= TAMALV2P;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
152 infg.stg++;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
153 if(p.vit <= 0) {
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
154 infg.stg += 4;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
155 Bom(p.x, p.y);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
156 // enemycount += (p.score * ((infg.stg / 128) + infg_level + 1));
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
157 p.state = delete_chara;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
158 p.collision = noaction;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
159 p.f = false;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
160 return p;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
161 }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
162 }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
163 }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
164
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
165
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
166
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
167
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
168 /*レーザーレベル1------------------------*/
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
169 for(i1 = 0; i1 < laser_lv1_end + 1; i1++) {
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
170 n = laser_lv1[i1].r * 128 / 4096;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
171 // var nx = laser_lv1[i1].w + laser_lv1[i1].scale;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
172 // var ny = laser_lv1[i1].h + laser_lv1[i1].scale;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
173
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
174 if ((laser_lv1[i1].x + n*d_x > ex) && (ex + w > laser_lv1[i1].x)
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
175 && (laser_lv1[i1].y + n*d_y > ey) && (laser_lv1[i1].y < ey + h)
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
176 && (laser_lv1[i1].r != -1)) {
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
177 laser_lv1[i1].r = -1;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
178 laser_lv1[i1].y = -1;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
179 p.vit -= LASERLV1P;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
180 infg.stg++;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
181 if(p.vit <= 0) {
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
182 infg.stg += 4;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
183 Bom(p.x, p.y);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
184 // enemycount += (p.score * ((infg.stg / 128) + infg_level + 1));
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
185 p.state = delete_chara;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
186 p.collision = noaction;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
187 p.f = false;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
188 return 1;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
189 }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
190
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
191 }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
192 }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
193
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
194
7
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
195 }
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
196
4343c1feedb5 upload boss.js xmlAlpha file
NOBUYASU Oshiro
parents:
diff changeset
197