annotate webGL/dandy/resources/tama.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
12
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
1 function TFon()
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
2 {
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
3 tf = true;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
4 }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
5
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
6 function TFoff()
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
7 {
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
8 tf = false;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
9 }
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
10
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
11
11
NOBUYASU Oshiro
parents:
diff changeset
12 function Puttama(type, x, y)
NOBUYASU Oshiro
parents:
diff changeset
13 {
12
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
14 TFon();
11
NOBUYASU Oshiro
parents:
diff changeset
15 switch (type) {
NOBUYASU Oshiro
parents:
diff changeset
16 case 0:
12
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
17 Putenemy(4, x, y, 0, 2, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
18 Putenemy(4, x, y, Mysin(15) * 2 / SANKAKU, Mycos(15) * 2 / SANKAKU, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
19 Putenemy(4, x, y, Mysin(30) * 2 / SANKAKU, Mycos(30) * 2 / SANKAKU, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
20 Putenemy(4, x, y, Mysin(-15) * 2 / SANKAKU, Mycos(-15) * 2 / SANKAKU, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
21 Putenemy(4, x, y, Mysin(-30) * 2 / SANKAKU, Mycos(-30) * 2 / SANKAKU, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
22 break;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
23 case 1:
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
24 Putenemy(4, x, y, Mysin(Math.random() % 15) * 2 / SANKAKU,
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
25 Mycos(Math.random() % 15) * 2 / SANKAKU, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
26 Putenemy(4, x, y, Mysin(Math.random() % 15) * 2 / SANKAKU,
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
27 Mycos(Math.random() % 15) * 2 / SANKAKU, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
28 Putenemy(4, x, y, Mysin(Math.random() % 15 * -1) * 2 / SANKAKU,
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
29 Mycos(Math.random() % 15 * -1) * 2 / SANKAKU, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
30 Putenemy(4, x, y, Mysin(Math.random() % 15 * -1) * 2 / SANKAKU,
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
31 Mycos(Math.random() % 15 * -1) * 2 / SANKAKU, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
32 break;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
33 case 2:
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
34 Putenemy(6, x, y, 10, -3, chara_state20);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
35 break;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
36 case 3:
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
37 Putenemy(6, x, y, -10, -3, chara_state21);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
38 break;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
39 case 4:
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
40 Putenemy(7, x, y, 0, 15, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
41 break;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
42 case 5:
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
43 Putenemy(8, x, y, 0, 30, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
44 break;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
45 case 6:
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
46 Putenemy(10, x, y, 0, 0, chara_state30);
11
NOBUYASU Oshiro
parents:
diff changeset
47 break;
12
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
48 case 7:
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
49 Putenemy(6, x, y, 0, 4, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
50 Putenemy(6, x, y, Mysin(15) * 4 / SANKAKU,
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
51 Mycos(15) * 4 / SANKAKU, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
52 Putenemy(6, x, y, Mysin(30) * 4 / SANKAKU,
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
53 Mycos(30) * 4 / SANKAKU, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
54 Putenemy(6, x, y, Mysin(-15) * 4 / SANKAKU,
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
55 Mycos(-15) * 4 / SANKAKU, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
56 Putenemy(6, x, y, Mysin(-30) * 4 / SANKAKU,
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
57 Mycos(-30) * 4 / SANKAKU, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
58 break;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
59 case 8:
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
60 Putenemy(3, x + 8, y + 8, -4, 0, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
61 Putenemy(3, x + 8, y + 8, 4, 0, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
62 Putenemy(3, x + 8, y, -4, Mysin(30) * -8 / SANKAKU, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
63 Putenemy(3, x + 8, y, 4, Mysin(30) * -8 / SANKAKU, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
64 break;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
65 case 9:
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
66 Putenemy(3, x + 8, y, -4, Mysin(30) * -8 / SANKAKU, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
67 Putenemy(3, x + 8, y, 4, Mysin(30) * -8 / SANKAKU, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
68 Putenemy(3, x + 8, y, -4, Mysin(30) * 8 / SANKAKU, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
69 Putenemy(3, x + 8, y, 4, Mysin(30) * 8 / SANKAKU, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
70 break;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
71 case 10:
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
72 Putenemy(3, x + 8, y, -4, 0, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
73 Putenemy(3, x + 8, y, 4, 0, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
74 Putenemy(3, x + 8, y, 0, 4, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
75 Putenemy(3, x + 8, y, 0, -4, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
76 break;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
77 case 11:
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
78 {
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
79 var a;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
80 a = Math.random() % 360;
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
81
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
82 Putenemy(3, x + 8, y, Mycos(a) / SANKAKU,
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
83 Mysin(a) / SANKAKU, chara_state0);
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
84 }
11
NOBUYASU Oshiro
parents:
diff changeset
85 }
12
61febc94fa62 upload dandy4.html,new xmlFile
NOBUYASU Oshiro
parents: 11
diff changeset
86 TFoff();
11
NOBUYASU Oshiro
parents:
diff changeset
87 }
NOBUYASU Oshiro
parents:
diff changeset
88
NOBUYASU Oshiro
parents:
diff changeset
89
NOBUYASU Oshiro
parents:
diff changeset
90 function loadBulletImage(tamano, e)
NOBUYASU Oshiro
parents:
diff changeset
91 {
NOBUYASU Oshiro
parents:
diff changeset
92 e.image = ebullets[tamano];
NOBUYASU Oshiro
parents:
diff changeset
93 e.texture = ebullets[tamano].texture;
NOBUYASU Oshiro
parents:
diff changeset
94 e.w = ebullets[tamano].w;
NOBUYASU Oshiro
parents:
diff changeset
95 e.h = ebullets[tamano].h;
NOBUYASU Oshiro
parents:
diff changeset
96 }
NOBUYASU Oshiro
parents:
diff changeset
97
NOBUYASU Oshiro
parents:
diff changeset
98
NOBUYASU Oshiro
parents:
diff changeset
99 function teki()
NOBUYASU Oshiro
parents:
diff changeset
100 {
NOBUYASU Oshiro
parents:
diff changeset
101 this.x=0;
NOBUYASU Oshiro
parents:
diff changeset
102 this.y=0;
NOBUYASU Oshiro
parents:
diff changeset
103 this.sx=0;
NOBUYASU Oshiro
parents:
diff changeset
104 this.xy=0;
NOBUYASU Oshiro
parents:
diff changeset
105 this.tamarno=0;
NOBUYASU Oshiro
parents:
diff changeset
106 this.tama=false;//タマ
NOBUYASU Oshiro
parents:
diff changeset
107 this.flag=0;//表示フラグ
NOBUYASU Oshiro
parents:
diff changeset
108 this.p=0;//硬さ
NOBUYASU Oshiro
parents:
diff changeset
109 this.move=0;
NOBUYASU Oshiro
parents:
diff changeset
110 this.sc=0;//スコア
NOBUYASU Oshiro
parents:
diff changeset
111 this.dt1=0;
NOBUYASU Oshiro
parents:
diff changeset
112 this.dt2=0;
NOBUYASU Oshiro
parents:
diff changeset
113 this.w=0;
NOBUYASU Oshiro
parents:
diff changeset
114 this.h=0;
NOBUYASU Oshiro
parents:
diff changeset
115 this.image = new Object();
NOBUYASU Oshiro
parents:
diff changeset
116 this.texture = new Object();
NOBUYASU Oshiro
parents:
diff changeset
117 this.s=0;
NOBUYASU Oshiro
parents:
diff changeset
118 return this;
NOBUYASU Oshiro
parents:
diff changeset
119 }
NOBUYASU Oshiro
parents:
diff changeset
120 /*
NOBUYASU Oshiro
parents:
diff changeset
121 function Putenemy2(tamano, x, y, vx, vy, chara_state)
NOBUYASU Oshiro
parents:
diff changeset
122 {
NOBUYASU Oshiro
parents:
diff changeset
123 // var ii = 0;
NOBUYASU Oshiro
parents:
diff changeset
124
NOBUYASU Oshiro
parents:
diff changeset
125 var e = new teki();
NOBUYASU Oshiro
parents:
diff changeset
126 e.x = x;
NOBUYASU Oshiro
parents:
diff changeset
127 e.y = y;
NOBUYASU Oshiro
parents:
diff changeset
128 e.vx = sx;
NOBUYASU Oshiro
parents:
diff changeset
129 e.vy = sy;
NOBUYASU Oshiro
parents:
diff changeset
130 e.tamano = tamano;
NOBUYASU Oshiro
parents:
diff changeset
131 e.flag = true;
NOBUYASU Oshiro
parents:
diff changeset
132 // e.sc = enemystate[tamano].sc;
NOBUYASU Oshiro
parents:
diff changeset
133 // e.dt1 = e.dt2 = 0;
NOBUYASU Oshiro
parents:
diff changeset
134 e.move = move;
NOBUYASU Oshiro
parents:
diff changeset
135 // e.tama = tf;
NOBUYASU Oshiro
parents:
diff changeset
136
NOBUYASU Oshiro
parents:
diff changeset
137 loadBulletImage(tamano, e);//image の登録
NOBUYASU Oshiro
parents:
diff changeset
138 active_chara_list.tama.push(e);//敵の弾情報を配列に追加
NOBUYASU Oshiro
parents:
diff changeset
139
NOBUYASU Oshiro
parents:
diff changeset
140 }
NOBUYASU Oshiro
parents:
diff changeset
141 */