Fix: change runMode as release
Add: apply start, result to typing practice, score text, stage timer Fix: ranking board text postion
This commit is contained in:
@@ -110,21 +110,24 @@ class RankingBoard {
|
||||
|
||||
// rank
|
||||
style.boundsAlignH = "right";
|
||||
game.add.text(this.getPosX(type), this.getPosY(index), data.rank, style)
|
||||
.setTextBounds(0, 0, 40, 40)
|
||||
.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
let rankText = game.add.text(this.getPosX(type), this.getPosY(index), data.rank, style);
|
||||
// .setTextBounds(0, 0, 40, 40)
|
||||
rankText.anchor.set(1, 0);
|
||||
rankText.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
|
||||
// player name
|
||||
game.add.text(this.getPosX(type) + 60, this.getPosY(index), data.playerName, style)
|
||||
.setTextBounds(0, 0, 60, 60)
|
||||
.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
let playerNameText = game.add.text(this.getPosX(type) + 20, this.getPosY(index), data.playerName, style);
|
||||
// .setTextBounds(0, 0, 60, 60)
|
||||
playerNameText.anchor.set(0, 0);
|
||||
playerNameText.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
|
||||
// bestRecord
|
||||
let bestRecord = StringUtil.getRecordTextWithoutUnit(data.bestRecord);
|
||||
style.boundsAlignH = "right";
|
||||
game.add.text(this.getPosX(type) + 120, this.getPosY(index), bestRecord, style)
|
||||
.setTextBounds(0, 0, 80, 60)
|
||||
.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
let recordText = game.add.text(this.getPosX(type) + 180, this.getPosY(index), bestRecord, style);
|
||||
// .setTextBounds(0, 0, 80, 60)
|
||||
recordText.anchor.set(1, 0);
|
||||
recordText.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
}
|
||||
|
||||
getPosX(type) {
|
||||
@@ -133,17 +136,17 @@ class RankingBoard {
|
||||
switch(type) {
|
||||
case DBConnectManager.TYPE_MY_RANKING_HOUR:
|
||||
case DBConnectManager.TYPE_ALL_RANKING_HOUR:
|
||||
posX = 320;
|
||||
posX = 330;
|
||||
break;
|
||||
|
||||
case DBConnectManager.TYPE_MY_RANKING_DAY:
|
||||
case DBConnectManager.TYPE_ALL_RANKING_DAY:
|
||||
posX = 540;
|
||||
posX = 560;
|
||||
break;
|
||||
|
||||
case DBConnectManager.TYPE_MY_RANKING_MONTH:
|
||||
case DBConnectManager.TYPE_ALL_RANKING_MONTH:
|
||||
posX = 760;
|
||||
posX = 790;
|
||||
}
|
||||
|
||||
return posX;
|
||||
|
||||
+14
-10
@@ -52,26 +52,30 @@ class Result {
|
||||
}
|
||||
|
||||
printRecord() {
|
||||
const style = { font: "64px Arial", fill: "#fff", align: "left", boundsAlignH: "center", boundsAlignV: "middle" };
|
||||
game.add.text(0, 0, "결과", style)
|
||||
.setTextBounds(0, 0, game.world.width, 100)
|
||||
.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
const style = { font: "bold 38px Arial", fill: "#fff", align: "left", boundsAlignH: "center", boundsAlignV: "middle" };
|
||||
let titleText = game.add.text(game.world.width / 2, 35, "결과", style);
|
||||
titleText.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
titleText.anchor.set(0.5);
|
||||
|
||||
let posY = 120;
|
||||
if(sessionStorageManager.record === null)
|
||||
sessionStorageManager.record = 0;
|
||||
let record = NumberUtil.numberWithCommas(Math.floor(sessionStorageManager.record));
|
||||
style.font = "bold 80px Arial";
|
||||
game.add.text(0, 0, record, style)
|
||||
.setTextBounds(0, posY, game.world.width, 60)
|
||||
.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
style.font = "80px Arial";
|
||||
let scoreText = game.add.text(
|
||||
game.world.width / 2, 150,
|
||||
record + StringUtil.getScoreUnit(sessionStorageManager.playingAppID),
|
||||
style
|
||||
);
|
||||
scoreText.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
scoreText.anchor.set(0.5);
|
||||
|
||||
|
||||
if(sessionStorageManager.isNewBestRecrd === true) {
|
||||
style.font = "32px Arial";
|
||||
let bestRecordText = game.add.text(0, 0, "!!! 새로운 최고 기록 !!!", style)
|
||||
.setTextBounds(0, posY + 80, game.world.width, 40);
|
||||
let bestRecordText = game.add.text(game.world.width / 2, 110, "!!! 새로운 최고 기록 !!!", style);
|
||||
// .setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
bestRecordText.anchor.set(0.5);
|
||||
bestRecordText.stroke = "#333";
|
||||
bestRecordText.strokeThickness = 5;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user