-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuNhin.cs
57 lines (50 loc) · 890 Bytes
/
BuNhin.cs
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
public class BuNhin
{
public short x;
public short y;
public string name;
public bool isInjure;
public BuNhin(string name, short x, short y)
{
this.x = x;
this.y = y;
this.name = name;
}
public void doInjure()
{
isInjure = true;
}
public bool isPaint()
{
if (x < GameScr.cmx)
{
return false;
}
if (x > GameScr.cmx + GameScr.gW)
{
return false;
}
if (y < GameScr.cmy)
{
return false;
}
if (y > GameScr.cmy + GameScr.gH + 30)
{
return false;
}
return true;
}
public void paint(mGraphics g)
{
if (isPaint())
{
mFont.tahoma_7_yellow.drawString(g, name, x, y - 32, 2, mFont.tahoma_7_grey);
SmallImage.drawSmallImage(g, 1180, x, y, 0, mGraphics.BOTTOM | mGraphics.HCENTER);
if (isInjure)
{
SmallImage.drawSmallImage(g, 288, x, y, 0, mGraphics.BOTTOM | mGraphics.HCENTER);
isInjure = false;
}
}
}
}