1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
-
-
|
|
|
!
-
|
-
|
|
!
!
| #module
#deffunc follow int p1,int p2,var p3,var p4,int p5,int p6 , int p7
if p7=0:s1=1:else:s1=p7
if p5=0{
if (p3>=p1-p6)&(p4>=p2-p6)&(p3<=p1+p6)&(p4<=p2+p6){
p3=p1
p4=p2
return 2
}
}else{
if (p3>=p1-p6)&(p4>=p2-p6)&(p3<=p1+p6)&(p4<=p2+p6){
return 2
}
}
s5=s1 dir=atan(p1-p3,p2-p4)
s6=sin(dir)*s5+p3:s7=cos(dir)*s5+p4
p3=s6
p4=s7
return 1
#global
x=mousex
y=mousey
sysfont 17
flags(_type_)=1
#if 1
*mainloop
follow mousex,mousey,x,y,0,1,2
redraw 0
color 255,255,255:boxf x-20,y-20,x+20,y+20
color : pos x,y :mes "☆"
if (stat=2):title "HIT":else:title ""
redraw 1
wait 0
goto *mainloop
#endif
#if 0
*mainloop
follow mousex,mousey,x,y,1,20,2
redraw 0
color 255,255,255:boxf x-20,y-20,x+20,y+20
color : pos x,y :mes "☆"
if (stat=2):title "HIT":else:title ""
redraw 1
wait 0
goto *mainloop
#endif
|