diff --git a/src/game/result/history_board.js b/src/game/result/history_board.js new file mode 100644 index 0000000..414134e --- /dev/null +++ b/src/game/result/history_board.js @@ -0,0 +1,6 @@ +///////////////////////////// +// History board + +class HistoryBoard { + +} \ No newline at end of file diff --git a/src/game/result/ranking_board.js b/src/game/result/ranking_board.js new file mode 100644 index 0000000..58bb482 --- /dev/null +++ b/src/game/result/ranking_board.js @@ -0,0 +1,6 @@ +///////////////////////////// +// Ranking board + +class RankingBoard { + +} \ No newline at end of file diff --git a/src/game/result/record_board.js b/src/game/result/record_board.js new file mode 100644 index 0000000..e801d0c --- /dev/null +++ b/src/game/result/record_board.js @@ -0,0 +1,49 @@ +///////////////////////////// +// Record board + +class RecordBoard { + + constructor() { + this.chartGraphics = game.add.graphics(0, 0); + + this.printRecordBoardHeader(); + } + + + printRecordBoardHeader() { + let posX = 40; + let posY = game.world.height / 2 + 20; + + var bar = game.add.graphics(); + bar.beginFill(0x444444); + bar.drawRect(0, posY, game.world.width, RecordBoard.HEADER_BAR_HEIGHT_PX); + + const style = { font: "32px Arial", fill: "#ffc", align: "left", boundsAlignH: "center", boundsAlignV: "middle" }; + this.printHeader(posX, posY, "최근의 내 기록", style); + + posX = 340; + style.fill = "#fff"; + this.printHeader(posX, posY, "수업시간 순위", style); + + posX = 560; + this.printHeader(posX, posY, "오늘의 순위", style); + + posX = 780; + this.printHeader(posX, posY, "이달의 순위", style); + + posX = 300; + posY = 480; + this.chartGraphics.lineStyle(3, 0x444444, 1); + this.chartGraphics.moveTo(posX, posY); + this.chartGraphics.lineTo(posX, posY + 200); + } + + printHeader(x, y, title, style) { + game.add.text(x, y, title, style) + .setTextBounds(0, 0, 200, RecordBoard.HEADER_BAR_HEIGHT_PX) + .setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2); + } + +} + +RecordBoard.HEADER_BAR_HEIGHT_PX = 60; \ No newline at end of file diff --git a/src/game/result/result.js b/src/game/result/result.js index a434bd0..bf97c05 100644 --- a/src/game/result/result.js +++ b/src/game/result/result.js @@ -1,5 +1,5 @@ ///////////////////////////// -// Start +// Result class Result { @@ -26,7 +26,8 @@ class Result { this.printScore(); this.makeStartButton(); - this.printRanking(); + let recordBoard = new RecordBoard(); + console.log(recordBoard); // bottom @@ -37,10 +38,10 @@ class Result { screenBottom.printBottomCenterText(playingAppName); screenBottom.printBottomRightText(sessionStorageManager.playerName); - this.loadHistoryRecords(); + // this.loadHistoryRecords(); // this.loadTypingStageData(); - this.loadRanking(); + // this.loadRanking(); } printScore() { diff --git a/src/web/client/result.html b/src/web/client/result.html index 26046c5..fe07b06 100644 --- a/src/web/client/result.html +++ b/src/web/client/result.html @@ -24,6 +24,9 @@ + + +