From ae7489da8a72b4fbd5af9554b8f7a12e8676188c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=A2=E1=84=91=E1=85=B3=E1=86=AF=20=E1=84=82?= =?UTF-8?q?=E1=85=A9=E1=84=90=E1=85=B3=E1=84=87=E1=85=AE=E1=86=A8?= Date: Sat, 14 Dec 2019 22:19:17 +0900 Subject: [PATCH] Fix: plus score with comma --- src/game/mouse/grilled_meat/game.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/game/mouse/grilled_meat/game.js b/src/game/mouse/grilled_meat/game.js index 25bb38d..08f72a6 100644 --- a/src/game/mouse/grilled_meat/game.js +++ b/src/game/mouse/grilled_meat/game.js @@ -281,7 +281,8 @@ var Game = { var score = meat.getScore(); this.scoreManager.plusScore(score); - var tempPlusScore = new PlusScore(this.god.x, this.god.y - 250, score); + var scoreWithComma = NumberUtil.numberWithCommas(score); + var tempPlusScore = new PlusScore(this.god.x, this.god.y - 250, scoreWithComma); this.plusScoreGroup.add(tempPlusScore); } else if(meat.getMeatGrade() == MeatBase.DONENESS_RARE) { this.badMeatCount++; @@ -297,7 +298,8 @@ var Game = { var score = meat.getScore(); this.scoreManager.plusScore(score); - var tempPlusScore = new PlusScore(this.god.x, this.god.y - 250, score); + var scoreWithComma = NumberUtil.numberWithCommas(score); + var tempPlusScore = new PlusScore(this.god.x, this.god.y - 250, scoreWithComma); this.plusScoreGroup.add(tempPlusScore); } } else { // meat is burn black @@ -337,7 +339,8 @@ var Game = { var score = meat.getScore(); this.scoreManager.plusScore(score); - var tempPlusScore = new PlusScore(this.trashCan.x, this.trashCan.y - 180, score); + var scoreWithComma = NumberUtil.numberWithCommas(score); + var tempPlusScore = new PlusScore(this.trashCan.x, this.trashCan.y - 180, scoreWithComma); this.plusScoreGroup.add(tempPlusScore); if(meat.getClassName() == NormalMeat.CLASS_NAME) {