-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainObject.cs
97 lines (89 loc) · 1.96 KB
/
MainObject.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
public class MainObject
{
public MyVector vecEFfect = new MyVector();
public void addDataeff(short id, long timelive, int miliSecondWait, bool isHead)
{
for (int i = 0; i < vecEFfect.size(); i++)
{
DataSkillEff dataSkillEff = (DataSkillEff)vecEFfect.elementAt(i);
if (dataSkillEff != null && dataSkillEff.idEff == id)
{
dataSkillEff.timelive = timelive + mSystem.currentTimeMillis();
dataSkillEff.miliSecondWait = miliSecondWait;
dataSkillEff.setTypeEff(timelive);
return;
}
}
DataSkillEff o = new DataSkillEff(id, timelive, miliSecondWait, isHead);
vecEFfect.addElement(o);
}
public int getStartPointPaintFly()
{
return 0;
}
public void paintTopDataEff(mGraphics g, int x, int y, int dy)
{
for (int i = 0; i < vecEFfect.size(); i++)
{
DataSkillEff dataSkillEff = (DataSkillEff)vecEFfect.elementAt(i);
if (dataSkillEff != null)
{
int y2 = y;
if (dataSkillEff.isHead)
{
y2 = y + dy + 4;
}
dataSkillEff.paintTopEff(g, x, y2);
}
}
}
public void paintBottomDataEff(mGraphics g, int x, int y, int dy)
{
for (int i = 0; i < vecEFfect.size(); i++)
{
DataSkillEff dataSkillEff = (DataSkillEff)vecEFfect.elementAt(i);
if (dataSkillEff != null)
{
int y2 = y;
if (dataSkillEff.isHead)
{
y2 = y + dy + 4;
}
dataSkillEff.paintBottomEff(g, x, y2);
}
}
}
public void updateDataEff(sbyte type, int statusMe)
{
for (int i = 0; i < vecEFfect.size(); i++)
{
DataSkillEff dataSkillEff = (DataSkillEff)vecEFfect.elementAt(i);
if (dataSkillEff != null)
{
dataSkillEff.update();
if (dataSkillEff.wantDetroy)
{
vecEFfect.removeElement(dataSkillEff);
}
}
}
if (type == 0 && statusMe == 14)
{
removeAllEff();
}
if (type == 1 && statusMe == 0)
{
removeAllEff();
}
}
public void setidPP(short id)
{
}
public virtual void setThoiTrang(short[] arr)
{
}
public void removeAllEff()
{
vecEFfect.removeAllElements();
}
}