Add: WhacAMole typing game

This commit is contained in:
2018-10-04 16:45:47 +09:00
parent 740115ee53
commit 72c8b9e1f4
28 changed files with 1136 additions and 112 deletions
-28
View File
@@ -45,13 +45,6 @@ HistoryBoard.prototype.calcDate = function(daysBefore) {
HistoryBoard.prototype.printRecord = function(index, date, bestRecord) {
if(sessionStorageManager.getPlayingAppName().indexOf("typing") < 0)
this.printMouseAppHistory(index, date, bestRecord);
else
this.printTypingAppHistory(index, date, appName, bestRecord);
}
HistoryBoard.prototype.printMouseAppHistory = function(index, date, bestRecord) {
var posX = 60;
var posY = game.world.height / 2 + 90 + 30 * index;
@@ -68,27 +61,6 @@ HistoryBoard.prototype.printMouseAppHistory = function(index, date, bestRecord)
.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
}
HistoryBoard.prototype.printTypingAppHistory = function(index, date, appName, bestRecord) {
var posX = 60;
var posY = game.world.height / 2 + 90 + 30 * index;
var style = { font: "20px Arial", fill: "#ffc", align: "right", boundsAlignH: "right", boundsAlignV: "top" };
style.boundsAlignH = "center";
game.add.text(posX, posY, date, style)
.setTextBounds(0, 0, 40, 40)
.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
game.add.text(posX + 60, posY, appName, style)
.setTextBounds(0, 0, 60, 60)
.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
style.boundsAlignH = "right";
game.add.text(posX + 120, posY, StringUtil.getRecordTextWithoutUnit(bestRecord), style)
.setTextBounds(0, 0, 80, 60)
.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
}
HistoryBoard.prototype.printSample = function() {
this.printRecord(0, DateUtil.getYYYYMMDD(this.calcDate(2)), 1270);
this.printRecord(1, DateUtil.getYYYYMMDD(this.calcDate(3)), 1150);