removed unnecessary code
This commit is contained in:
@@ -1,21 +1,12 @@
|
||||
package de.miaurizius.jgame2d.core;
|
||||
|
||||
import java.awt.*;
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
public class UI {
|
||||
|
||||
GamePanel panel;
|
||||
Graphics graphics2d;
|
||||
Font arial_40, arial_80B;
|
||||
DecimalFormat df = new DecimalFormat("#0.00");
|
||||
|
||||
public boolean messageOn = false;
|
||||
public String message;
|
||||
public boolean gameFinished = false;
|
||||
|
||||
int msgC = 0;
|
||||
double playTime;
|
||||
|
||||
public UI(GamePanel panel) {
|
||||
this.panel = panel;
|
||||
@@ -23,11 +14,6 @@ public class UI {
|
||||
arial_80B = new Font("Arial", Font.BOLD, 80);
|
||||
}
|
||||
|
||||
public void showMessage(String text) {
|
||||
message = text;
|
||||
messageOn = true;
|
||||
}
|
||||
|
||||
public void draw(Graphics graphics2d) {
|
||||
this.graphics2d = graphics2d;
|
||||
graphics2d.setFont(arial_40);
|
||||
@@ -44,6 +30,7 @@ public class UI {
|
||||
}
|
||||
|
||||
public void drawPauseScreen() {
|
||||
graphics2d.setFont(graphics2d.getFont().deriveFont(Font.PLAIN, 80));
|
||||
String text = "PAUSED";
|
||||
int y = panel.screenHeight / 2;
|
||||
graphics2d.drawString(text, getCenteredX(text), y);
|
||||
|
||||
Reference in New Issue
Block a user