-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEnemyPOJO.java
More file actions
74 lines (64 loc) · 1.56 KB
/
Copy pathEnemyPOJO.java
File metadata and controls
74 lines (64 loc) · 1.56 KB
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
/*
* Authors: Jerry Li & Victor Jiang
* Date: June 13, 2025
* Description: This class represents an enemy entity's key properties
*/
public class EnemyPOJO {
public String name;
public int damage;
public int hp;
public int size;
public float speed;
public String frame1;
public String frame2;
// Constructor
public EnemyPOJO(String name, int damage, int hp, int size, float speed, String frame1, String frame2) {
this.name = name;
this.damage = damage;
this.hp = hp;
this.size = size;
this.speed = speed;
this.frame1 = frame1;
this.frame2 = frame2;
}
// Get enemy name
public String getName() {
return name;
}
// Get enemy damage
public int getDamage() {
return damage;
}
// Get enemy health
public int getHp() {
return hp;
}
// Get enemy size
public int getSize() {
return size;
}
// get speed of enemy
public float getSpeed() {
return speed;
}
// get our frame
public String getFrame1() {
return frame1;
}
// get our 2nd frame
public String getFrame2() {
return frame2;
}
@Override
public String toString() {
return "EnemyPOJO{" +
"name='" + name + '\'' +
", damage=" + damage +
", hp=" + hp +
", size=" + size +
", speed=" + speed +
", frame1='" + frame1 + '\'' +
", frame2='" + frame2 + '\'' +
'}';
}
}