From 8c9e6d220c2fb68075e72b12ce0cc1a243d31365 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Mon, 5 Sep 2022 00:58:34 +0600 Subject: ,tp jrheukznjhf pfnj njxyjt xbckj happE --- .../com/ilotterytea/maxoning/screens/GameScreen.java | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'core') diff --git a/core/src/com/ilotterytea/maxoning/screens/GameScreen.java b/core/src/com/ilotterytea/maxoning/screens/GameScreen.java index a5f8df3..263f282 100644 --- a/core/src/com/ilotterytea/maxoning/screens/GameScreen.java +++ b/core/src/com/ilotterytea/maxoning/screens/GameScreen.java @@ -26,7 +26,6 @@ import com.ilotterytea.maxoning.utils.serialization.GameDataSystem; import com.rafaskoberg.gdx.typinglabel.TypingLabel; import java.io.IOException; -import java.text.DecimalFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; @@ -34,8 +33,6 @@ import java.util.Map; public class GameScreen implements Screen, InputProcessor { final MaxonGame game; - DecimalFormat decimalFormat; - MaxonPlayer player; Stage stage; @@ -63,8 +60,6 @@ public class GameScreen implements Screen, InputProcessor { public GameScreen(MaxonGame game) throws IOException, ClassNotFoundException { this.game = game; - decimalFormat = new DecimalFormat("0.00"); - player = new MaxonPlayer(); player.load(GameDataSystem.LoadData()); @@ -215,8 +210,8 @@ public class GameScreen implements Screen, InputProcessor { // Points label: pointsLabel = new Label(game.locale.FormattedText("game.points", - decimalFormat.format(player.points), - decimalFormat.format(player.multiplier) + String.valueOf(player.points), + String.valueOf(player.multiplier) ), skin); pointsLabel.setPosition(pointsBg.getX(), pointsBg.getY()); @@ -299,7 +294,7 @@ public class GameScreen implements Screen, InputProcessor { player.points += multiplier; - final TypingLabel label = new TypingLabel(game.locale.FormattedText("game.newPoint", String.valueOf(Float.parseFloat(decimalFormat.format(1 * player.multiplier)))), skin, "default"); + final TypingLabel label = new TypingLabel(game.locale.FormattedText("game.newPoint", String.valueOf(1 * player.multiplier)), skin, "default"); label.setPosition( mainTable.getX() + actor.getActorX(), @@ -367,8 +362,8 @@ public class GameScreen implements Screen, InputProcessor { // Update the points label: pointsLabel.setText(game.locale.FormattedText("game.points", - decimalFormat.format(player.points), - decimalFormat.format(player.multiplier) + String.valueOf(player.points), + String.valueOf(player.multiplier) )); stage.draw(); @@ -439,7 +434,7 @@ public class GameScreen implements Screen, InputProcessor { player.points += 1 * player.multiplier; - final TypingLabel label = new TypingLabel(game.locale.FormattedText("game.newPoint", String.valueOf(Float.parseFloat(decimalFormat.format(1 * player.multiplier)))), skin, "default"); + final TypingLabel label = new TypingLabel(game.locale.FormattedText("game.newPoint", String.valueOf(1 * player.multiplier)), skin, "default"); label.setPosition( mainTable.getX() + actor.getActorX(), -- cgit v1.2.3