Fix: library path

This commit is contained in:
2018-12-24 10:25:08 +09:00
parent 618bc4453a
commit 1a2dde8a94
30 changed files with 116 additions and 99 deletions
+38
View File
@@ -0,0 +1,38 @@
function ScoreBoard() {
var fontStyle = ScoreBoard.DEFAULT_TEXT_FONT;
fontStyle.align = "right";
fontStyle.boundsAlignH = "right";
this.label = game.add.text(0, 0, "점수 : ", fontStyle)
.setTextBounds(0, 0, game.world.width / 2, ScoreBoard.FONT_HEIGHT_PX);
fontStyle.align = "left";
fontStyle.boundsAlignH = "left";
this.scoreText = game.add.text(game.world.width / 2, 0, "0", fontStyle)
.setTextBounds(0, 0, game.world.width / 2, ScoreBoard.FONT_HEIGHT_PX);
// var grd = this.label.context.createLinearGradient(0, 0, 0, ScoreBoard.FONT_HEIGHT_PX);
// grd.addColorStop(0, '#8ED6FF');
// grd.addColorStop(1, '#004CB3');
// this.label.fill = grd;
// this.scoreText.fill = grd;
// this.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
// this.label.stroke = '#000';
// this.label.strokeThickness = 3;
};
ScoreBoard.prototype.printScore = function(score) {
this.scoreText.text = score;
}
ScoreBoard.FONT_HEIGHT_PX = 70;
ScoreBoard.DEFAULT_TEXT_FONT = {
font: "38px Arial",
align: "center",
boundsAlignH: "center", // left, center. right
boundsAlignV: "middle", // top, middle, bottom
fill: "#fff"
};