-
Notifications
You must be signed in to change notification settings - Fork 0
/
Enemy.pde
54 lines (45 loc) · 1.24 KB
/
Enemy.pde
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
class Enemy
{
final static int TYPE_ABSTRACTION = 0;
final static int TYPE_CALCINATION = 1;
final static int TYPE_COAGULATION = 2;
final static int TYPE_COMPOSITION = 3;
int type;
int hp;
int str;
int def;
PImage image;
Enemy( int newType, int level )
{
switch( newType )
{
case TYPE_ABSTRACTION:
image = loadImage( "abstraction.png" );
hp = 37;
str = 50;
def = 25;
break;
case TYPE_CALCINATION:
image = loadImage( "calcination.png" );
hp = 12;
str = 37;
def = 7;
break;
case TYPE_COAGULATION:
image = loadImage( "coagulation.png" );
str = 12;
hp = 25;
def = 25;
break;
case TYPE_COMPOSITION:
image = loadImage( "composition.png" );
hp = 17;
str = 17;
def = 12;
break;
}
hp += 5 * level;
str += 5 * level;
def += 5 * level;
}
}