|
|
@ -8,8 +8,12 @@ public class GameManager { |
|
|
|
public Player player; |
|
|
|
public int score = 0; |
|
|
|
public boolean isPaused; |
|
|
|
public int livesRemaining; |
|
|
|
public int failedAttempts; |
|
|
|
|
|
|
|
public GameManager() { |
|
|
|
livesRemaining = 3; |
|
|
|
failedAttempts = 0; |
|
|
|
setupGame(); |
|
|
|
} |
|
|
|
|
|
|
@ -23,9 +27,19 @@ public class GameManager { |
|
|
|
ghosts[i] = new Ghost(this); |
|
|
|
} |
|
|
|
isPaused = false; |
|
|
|
|
|
|
|
} |
|
|
|
/* public void handleGhostCollision() { |
|
|
|
livesRemaining--; // Reduziere verbleibende leben um 1 |
|
|
|
failedAttempts++; // Erhöhe die Anzahl der Fehlversuche |
|
|
|
if(livesRemaining <= 0) { |
|
|
|
gameOver(); //wenn Keine Leben mehr übrig sind. |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public void gameOver() { |
|
|
|
// todo |
|
|
|
} |
|
|
|
*/ |
|
|
|
public void Update() { |
|
|
|
if(!isPaused) { |
|
|
|
visualizer.Update(); |
|
|
|