summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2022-09-05 00:58:34 +0600
committerilotterytea <iltsu@alright.party>2022-09-05 00:58:34 +0600
commit8c9e6d220c2fb68075e72b12ce0cc1a243d31365 (patch)
tree6aff4cb3081fb87afed9edfbb8a6dbd3679cb19e /core
parent8dff0d7252299df7f33efff88e152a9a13495f13 (diff)
,tp jrheukznjhf pfnj njxyjt xbckj happE
Diffstat (limited to 'core')
-rw-r--r--core/src/com/ilotterytea/maxoning/screens/GameScreen.java17
1 files changed, 6 insertions, 11 deletions
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(),