Commit f7a12162 authored by nargessalehi98's avatar nargessalehi98

Add Tank Health amount;

parent c73ff932
...@@ -108,9 +108,9 @@ public class GameState { ...@@ -108,9 +108,9 @@ public class GameState {
for (Wall wall : Controller.walls) for (Wall wall : Controller.walls)
if (!PermissionDown && (!(getBounds(locX, locY).intersects(new Rectangle((int) wall.getX(), (int) wall.getY(), 50, 5))) || if (!PermissionDown && (!(getBounds(locX, locY).intersects(new Rectangle((int) wall.getX(), (int) wall.getY(), 50, 5))) ||
!(getBounds(locX, locY).intersects(new Rectangle((int) wall.getX(), (int) wall.getY(), 5, 50))))) { !(getBounds(locX, locY).intersects(new Rectangle((int) wall.getX(), (int) wall.getY(), 5, 50))))) {
move(+5); move(+5);
break; break;
} }
} }
if (keyDOWN) { if (keyDOWN) {
...@@ -145,8 +145,6 @@ public class GameState { ...@@ -145,8 +145,6 @@ public class GameState {
for(Prize prize:Controller.prizes){ for(Prize prize:Controller.prizes){
if((getBounds(locX, locY).intersects(new Rectangle((int) prize.getX(), (int) prize.getY(), prize.getWidth(), prize.getHeight())))){ if((getBounds(locX, locY).intersects(new Rectangle((int) prize.getX(), (int) prize.getY(), prize.getWidth(), prize.getHeight())))){
Controller.getPrize=true; Controller.getPrize=true;
// System.out.println("get");
System.out.println(prize.getName());
} }
} }
......
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