comparison dandy/resources/tama.js @ 1:54589bb5e57d

add dandy
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Thu, 23 Feb 2012 14:51:33 +0900
parents
children
comparison
equal deleted inserted replaced
0:718974a1a32b 1:54589bb5e57d
1 function TFon()
2 {
3 tf = true;
4 }
5
6 function TFoff()
7 {
8 tf = false;
9 }
10
11
12 function Puttama(type, x, y)
13 {
14 TFon();
15 switch (type) {
16 case 0:
17 Putenemy(4, x, y, 0, 2, chara_state0);
18 Putenemy(4, x, y, Mysin(15) * 2 / SANKAKU, Mycos(15) * 2 / SANKAKU, chara_state0);
19 Putenemy(4, x, y, Mysin(30) * 2 / SANKAKU, Mycos(30) * 2 / SANKAKU, chara_state0);
20 Putenemy(4, x, y, Mysin(-15) * 2 / SANKAKU, Mycos(-15) * 2 / SANKAKU, chara_state0);
21 Putenemy(4, x, y, Mysin(-30) * 2 / SANKAKU, Mycos(-30) * 2 / SANKAKU, chara_state0);
22 break;
23 case 1:
24 Putenemy(4, x, y, Mysin(Math.random() % 15) * 2 / SANKAKU,
25 Mycos(Math.random() % 15) * 2 / SANKAKU, chara_state0);
26 Putenemy(4, x, y, Mysin(Math.random() % 15) * 2 / SANKAKU,
27 Mycos(Math.random() % 15) * 2 / SANKAKU, chara_state0);
28 Putenemy(4, x, y, Mysin(Math.random() % 15 * -1) * 2 / SANKAKU,
29 Mycos(Math.random() % 15 * -1) * 2 / SANKAKU, chara_state0);
30 Putenemy(4, x, y, Mysin(Math.random() % 15 * -1) * 2 / SANKAKU,
31 Mycos(Math.random() % 15 * -1) * 2 / SANKAKU, chara_state0);
32 break;
33 case 2:
34 Putenemy(6, x, y, 10, -3, chara_state20);
35 break;
36 case 3:
37 Putenemy(6, x, y, -10, -3, chara_state21);
38 break;
39 case 4:
40 Putenemy(7, x, y, 0, 15, chara_state0);
41 break;
42 case 5:
43 // Putenemy(1, x, y, 0, 30, chara_state0);
44 Putenemy(5, x, y, 0, 30, chara_state0);
45 break;
46 case 6:
47 Putenemy(10, x, y, 0, 0, chara_state30);
48 break;
49 case 7:
50 Putenemy(6, x, y, 0, 4, chara_state0);
51 Putenemy(6, x, y, Mysin(15) * 4 / SANKAKU,
52 Mycos(15) * 4 / SANKAKU, chara_state0);
53 Putenemy(6, x, y, Mysin(30) * 4 / SANKAKU,
54 Mycos(30) * 4 / SANKAKU, chara_state0);
55 Putenemy(6, x, y, Mysin(-15) * 4 / SANKAKU,
56 Mycos(-15) * 4 / SANKAKU, chara_state0);
57 Putenemy(6, x, y, Mysin(-30) * 4 / SANKAKU,
58 Mycos(-30) * 4 / SANKAKU, chara_state0);
59 break;
60 case 8:
61 Putenemy(3, x + 8, y + 8, -4, 0, chara_state0);
62 Putenemy(3, x + 8, y + 8, 4, 0, chara_state0);
63 Putenemy(3, x + 8, y, -4, Mysin(30) * -8 / SANKAKU, chara_state0);
64 Putenemy(3, x + 8, y, 4, Mysin(30) * -8 / SANKAKU, chara_state0);
65 break;
66 case 9:
67 Putenemy(3, x + 8, y, -4, Mysin(30) * -8 / SANKAKU, chara_state0);
68 Putenemy(3, x + 8, y, 4, Mysin(30) * -8 / SANKAKU, chara_state0);
69 Putenemy(3, x + 8, y, -4, Mysin(30) * 8 / SANKAKU, chara_state0);
70 Putenemy(3, x + 8, y, 4, Mysin(30) * 8 / SANKAKU, chara_state0);
71 break;
72 case 10:
73 Putenemy(3, x + 8, y, -4, 0, chara_state0);
74 Putenemy(3, x + 8, y, 4, 0, chara_state0);
75 Putenemy(3, x + 8, y, 0, 4, chara_state0);
76 Putenemy(3, x + 8, y, 0, -4, chara_state0);
77 break;
78 case 11:
79 {
80 var a;
81 a = Math.random() % 360;
82
83 Putenemy(3, x + 8, y, Mycos(a) / SANKAKU,
84 Mysin(a) / SANKAKU, chara_state0);
85 }
86 }
87 TFoff();
88 }
89
90
91 function loadBulletImage(tamano, e)
92 {
93 e.image = ebullets[tamano];
94 e.texture = ebullets[tamano].texture;
95 e.w = ebullets[tamano].w;
96 e.h = ebullets[tamano].h;
97 }
98
99