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;
|
||||
|
||||
Reference in New Issue
Block a user