Add: menu bg
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
class WelcomePlayerText extends Phaser.Text {
|
||||
|
||||
constructor(playerName) {
|
||||
super(game, game.world.width / 2, WelcomePlayerText.FONT_HEIGHT_PX, "어서오세요, " + playerName + "님", WelcomePlayerText.DEFAULT_TEXT_FONT);
|
||||
super(game, game.world.width / 2, 32, "어서오세요, " + playerName + "님", WelcomePlayerText.DEFAULT_TEXT_FONT);
|
||||
|
||||
this.anchor.set(0.5);
|
||||
this.inputEnabled = false;
|
||||
@@ -14,17 +14,9 @@ class WelcomePlayerText extends Phaser.Text {
|
||||
this.stroke = '#000';
|
||||
this.strokeThickness = 5;
|
||||
|
||||
this.alpha = 0;
|
||||
let tweenAlpha = game.add.tween(this);
|
||||
tweenAlpha.from( { alpha: 0 } ).to( { alpha: 100 }, 1000, Phaser.Easing.Linear.None, true);
|
||||
|
||||
/*
|
||||
let tweenAlpha = game.add.tween(this);
|
||||
tweenAlpha.to( { alpha: 0 }, 1000, Phaser.Easing.Linear.None, true);
|
||||
|
||||
let tweenMoveUp = game.add.tween(this);
|
||||
tweenMoveUp.to( { y: this.y - WelcomePlayerText.MOVE_UP_AMOUNT_PX }, 1000, Phaser.Easing.Linear.None, true);
|
||||
tweenMoveUp.onComplete.addOnce(this.destroySelf, this);
|
||||
*/
|
||||
tweenAlpha.to( { alpha: 1 }, 500, Phaser.Easing.Linear.None, true);
|
||||
|
||||
game.add.existing(this);
|
||||
};
|
||||
@@ -40,6 +32,4 @@ WelcomePlayerText.DEFAULT_TEXT_FONT = {
|
||||
boundsAlignH: "center", // left, center. right
|
||||
boundsAlignV: "middle", // top, middle, bottom
|
||||
fill: "#fff"
|
||||
};
|
||||
|
||||
WelcomePlayerText.FONT_HEIGHT_PX = 35;
|
||||
};
|
||||
Reference in New Issue
Block a user