Add: HistoryText
Fix: ranking.js, result.js
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
function RankingText(type, x, y, appID) {
|
||||
|
||||
this.type = type;
|
||||
this.appID = appID;
|
||||
this.playerID = -1;
|
||||
@@ -10,14 +9,16 @@ function RankingText(type, x, y, appID) {
|
||||
this.textPlayerName.anchor.x = 0;
|
||||
this.textRecord = this.makeRecordText(x, y);
|
||||
this.textRecord.anchor.x = 1;
|
||||
|
||||
};
|
||||
|
||||
RankingText.prototype.makeText = function(x, y, fontStyle) {
|
||||
var text = game.add.text(x, y, "", fontStyle);
|
||||
text.anchor.y = 0.5;
|
||||
text.inputEnabled = false;
|
||||
text.setShadow(3, 3, 'rgba(32, 32, 32, 1)', 2);
|
||||
if(this.type == RankingText.PLACE_FOR_RANKING)
|
||||
text.setShadow(3, 3, 'rgba(32, 32, 32, 1)', 2);
|
||||
else
|
||||
text.setShadow(1, 1, 'rgba(32, 32, 32, 1)', 2);
|
||||
|
||||
return text;
|
||||
};
|
||||
@@ -31,7 +32,7 @@ RankingText.prototype.makeRankingText = function(x, y) {
|
||||
}
|
||||
else {
|
||||
fontStyle = RankingText.FONT_STYLE_FOR_RESULT;
|
||||
offsetX = 10;
|
||||
offsetX = 30;
|
||||
}
|
||||
|
||||
return this.makeText(x + offsetX, y, fontStyle);
|
||||
@@ -46,7 +47,7 @@ RankingText.prototype.makePlayerNameText = function(x, y) {
|
||||
}
|
||||
else {
|
||||
fontStyle = RankingText.FONT_STYLE_FOR_RESULT;
|
||||
offsetX = 20;
|
||||
offsetX = 40;
|
||||
}
|
||||
|
||||
return this.makeText(x + offsetX, y, fontStyle);
|
||||
@@ -117,7 +118,6 @@ RankingText.prototype.setMyRankingTextColor = function() {
|
||||
if(sessionStorageManager.getPlayerID() != this.playerID)
|
||||
return;
|
||||
|
||||
console.log(this.playerID);
|
||||
var fillColor = "#9acd32"; // yellowgreen
|
||||
var strokeColor = "#2e8b57"; // seagreen
|
||||
this.textRanking.fill = fillColor;
|
||||
@@ -154,7 +154,7 @@ RankingText.FONT_STYLE_FOR_RANKING = {
|
||||
};
|
||||
|
||||
RankingText.FONT_STYLE_FOR_RESULT = {
|
||||
font: "30px Arial",
|
||||
font: "19px Arial",
|
||||
fill: "#fff"
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user