Compare commits

..

2 Commits

4 changed files with 4 additions and 1 deletions
Binary file not shown.
+3
View File
@@ -62,6 +62,9 @@ public class MyWorld extends World
public void act() public void act()
{ {
if (getObjects(Score.class).size() > 0){
removeObjects(getObjects(Score.class));
}
Score score = new Score(); Score score = new Score();
addObject(score, 200, 30); addObject(score, 200, 30);
score.setImage("Score1.png"); score.setImage("Score1.png");
Binary file not shown.
+1 -1
View File
@@ -15,10 +15,10 @@ public class PlayerProjectile extends Actor
public void act() public void act()
{ {
move(7); move(7);
checkForEnemyCollision();
if (!isProjectileOnScreen()){ if (!isProjectileOnScreen()){
getWorld().removeObject(this); getWorld().removeObject(this);
} }
checkForEnemyCollision();
} }
public void checkForEnemyCollision(){ public void checkForEnemyCollision(){