Fix: Score Objekte vom vorherigen frame löschen damit die spiel performance nicht beeinträchtigt wird
This commit is contained in:
Binary file not shown.
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user