Commit f803e3b3 authored by nargessalehi98's avatar nargessalehi98

Update Tank.

parent cfdf5e7d
...@@ -12,8 +12,11 @@ public class Tank { ...@@ -12,8 +12,11 @@ public class Tank {
BufferedImage icon; BufferedImage icon;
Bullets bullets; Bullets bullets;
GameState state; GameState state;
int Health;
Prize prize;
public Tank(String path){ public Tank(String path){
Health=100;
try { try {
icon = ImageIO.read(new File(path)); icon = ImageIO.read(new File(path));
} }
...@@ -39,4 +42,20 @@ public class Tank { ...@@ -39,4 +42,20 @@ public class Tank {
public GameState getState() { public GameState getState() {
return state; return state;
} }
public double getRotateAmount() {
return rotateAmount;
}
public Bullets getBullets() {
return bullets;
}
public int getHealth() {
return Health;
}
public void setHealth(int healthDamage) {
Health = Health-healthDamage;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment