Fix: screen top ui, screen bottom ui
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
class WelcomePlayerText extends Phaser.Text {
|
||||
|
||||
constructor(playerName) {
|
||||
super(game, game.world.width / 2, 32, "어서오세요, " + playerName + "님", WelcomePlayerText.DEFAULT_TEXT_FONT);
|
||||
super(game, game.world.width / 2, game.world.height / 2 - 40, "어서오세요, " + playerName + "님", WelcomePlayerText.DEFAULT_TEXT_FONT);
|
||||
|
||||
this.anchor.set(0.5);
|
||||
this.inputEnabled = false;
|
||||
@@ -14,9 +14,9 @@ class WelcomePlayerText extends Phaser.Text {
|
||||
this.stroke = '#000';
|
||||
this.strokeThickness = 5;
|
||||
|
||||
this.alpha = 0;
|
||||
this.alpha = 1;
|
||||
let tweenAlpha = game.add.tween(this);
|
||||
tweenAlpha.to( { alpha: 1 }, 500, Phaser.Easing.Linear.None, true);
|
||||
tweenAlpha.to( { alpha: 0 }, 2000, Phaser.Easing.Back.In, true);
|
||||
|
||||
game.add.existing(this);
|
||||
};
|
||||
@@ -28,7 +28,7 @@ class WelcomePlayerText extends Phaser.Text {
|
||||
}
|
||||
|
||||
WelcomePlayerText.DEFAULT_TEXT_FONT = {
|
||||
font: "40px Arial",
|
||||
font: "60px Arial",
|
||||
boundsAlignH: "center", // left, center. right
|
||||
boundsAlignV: "middle", // top, middle, bottom
|
||||
fill: "#fff"
|
||||
|
||||
Reference in New Issue
Block a user