Minor changes
This commit is contained in:
@ -7,20 +7,19 @@ import se.urmo.game.collision.GhostCollisionChecker;
|
||||
import se.urmo.game.entities.ghost.Ghost;
|
||||
import se.urmo.game.entities.ghost.GhostMode;
|
||||
import se.urmo.game.entities.pacman.PacMan;
|
||||
import se.urmo.game.main.Game;
|
||||
import se.urmo.game.map.GameMap;
|
||||
import se.urmo.game.map.MapTile;
|
||||
import se.urmo.game.map.TileType;
|
||||
import se.urmo.game.util.Direction;
|
||||
import se.urmo.game.util.GameFonts;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.Color;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Point;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
@Slf4j
|
||||
public class PlayingState implements GameState {
|
||||
public static final int REMAINING_LIVES = 0;
|
||||
private final Game game;
|
||||
private final GameStateManager gameStateManager;
|
||||
private final GameOverState gameOverState;
|
||||
|
||||
@ -48,8 +47,7 @@ public class PlayingState implements GameState {
|
||||
private long phaseStartMs = System.currentTimeMillis();
|
||||
private boolean deathInProgress;
|
||||
|
||||
public PlayingState(Game game, GameStateManager gameStateManager, GameOverState gameOverState) {
|
||||
this.game = game;
|
||||
public PlayingState(GameStateManager gameStateManager, GameOverState gameOverState) {
|
||||
this.gameStateManager = gameStateManager;
|
||||
this.gameOverState = gameOverState;
|
||||
this.map = new GameMap("maps/map1.csv");
|
||||
@ -147,7 +145,8 @@ public class PlayingState implements GameState {
|
||||
// Phase overlays
|
||||
switch (phase) {
|
||||
case READY -> drawCenterText(g, "READY!");
|
||||
case LEVEL_COMPLETE -> drawCenterText(g, "LEVEL COMPLETE!");
|
||||
case LEVEL_COMPLETE ->
|
||||
drawCenterText(g, "LEVEL " + levelManager.getCurrentLevel().getLevel() + " COMPLETE!");
|
||||
case LIFE_LOST -> drawCenterText(g, "LIFE LOST");
|
||||
default -> { /* no overlay */ }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user