-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSKILL.cpp
76 lines (58 loc) · 870 Bytes
/
SKILL.cpp
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
#include "SKILL.h"
SKILL::SKILL(int ATK1, int CD1, int LAST_TIME1, int cost1, int range1, bool Isenemy) : GameObject(0, 0, 0, 1, 0, 0, false)
{
SetDMG(ATK1);
CD = CD1;
LAST_TIME = LAST_TIME1;
cost = cost1;
reATK = GetDMG();
recost = cost;
reCD = CD;
range = range1;
Box = NULL;
pointnum = 0;
host = nullptr;
IsEnemy = Isenemy;
IsPenetrate = false;
}
SKILL::~SKILL()
{
if (Box)
{
delete[]Box;
Box = NULL;
}
}
int SKILL::GetCD()const
{
return CD;
}
int SKILL::GetLAST_TIME()const
{
return LAST_TIME;
}
int SKILL::GetCost()const
{
return cost;
}
void SKILL::SetCD(int nowCD)
{
CD = nowCD;
}
void SKILL::Setcost(int nowcost)
{
cost = nowcost;
}
void SKILL::RESET(bool bCD, bool bATK, bool bcost)
{
if (bCD)
SetCD(reCD);
if (bATK)
SetDMG(reATK);
if (bcost)
Setcost(recost);
}
Point* SKILL::GetBoundingBox()
{
return Box;
}