21 lines
561 B
JavaScript
21 lines
561 B
JavaScript
function HowToPlay(x, y) {
|
|
this.howToPlayText = game.add.text(
|
|
game.world.centerX, game.world.centerY - HowToPlay.TEXT_OFFSET_X,
|
|
"", this.getFontStyle()
|
|
);
|
|
this.howToPlayText.anchor.set(0.5);
|
|
this.howToPlayText.stroke = "#333";
|
|
this.howToPlayText.strokeThickness = 3;
|
|
this.howToPlayText.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
|
}
|
|
|
|
HowToPlay.prototype.printHowToPlay = function(text) {
|
|
this.howToPlayText.text = text;
|
|
}
|
|
|
|
HowToPlay.prototype.getFontStyle = function() {
|
|
return { font: "32px Arial", fill: "#fff" };
|
|
}
|
|
|
|
|
|
HowToPlay.TEXT_OFFSET_X = 200; |