Fix: updateRecord before Result

This commit is contained in:
2018-12-25 18:49:34 +09:00
parent 1a2dde8a94
commit 4c1a2a278e
18 changed files with 287 additions and 56 deletions
+46
View File
@@ -0,0 +1,46 @@
MissionClearText.prototype = Object.create(Phaser.Text.prototype);
MissionClearText.constructor = MissionClearText;
function MissionClearText() {
Phaser.Text.call(
this, game,
game.world.width / 2,
game.world.height / 2 - MissionClearText.MOVE_AMOUNT_PX,
"작업 완료",
MissionClearText.DEFAULT_TEXT_FONT
);
// super(game, 600, 300, "게임 오버", MissionClearText.DEFAULT_TEXT_FONT);
this.anchor.set(0.5);
this.inputEnabled = false;
var grd = this.context.createLinearGradient(0, 0, 0, this.height);
grd.addColorStop(0, '#8ED6FF');
grd.addColorStop(1, '#4C6CB3');
this.fill = grd;
// this.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
this.stroke = '#000';
this.strokeThickness = 10;
this.alpha = 0;
var tweenAlpha = game.add.tween(this);
tweenAlpha.to( { alpha: 1 }, MissionClearText.TWEEN_ALPHA_TIME, Phaser.Easing.Linear.None, true);
var tweenMove = game.add.tween(this);
tweenMove.to( { y: game.world.height / 2 }, MissionClearText.TWEEN_MOVE_TIME, Phaser.Easing.Bounce.Out, true);
game.add.existing(this);
};
MissionClearText.DEFAULT_TEXT_FONT = {
font: "bold 100px Arial",
boundsAlignH: "center", // left, center. right
boundsAlignV: "middle", // top, middle, bottom
fill: "#fff"
};
MissionClearText.MOVE_AMOUNT_PX = 200;
MissionClearText.TWEEN_ALPHA_TIME = 1000;
MissionClearText.TWEEN_MOVE_TIME = 1500;
+46
View File
@@ -0,0 +1,46 @@
TimeOverText.prototype = Object.create(Phaser.Text.prototype);
TimeOverText.constructor = TimeOverText;
function TimeOverText() {
Phaser.Text.call(
this, game,
game.world.width / 2,
game.world.height / 2 - TimeOverText.MOVE_AMOUNT_PX,
"타임 오버",
TimeOverText.DEFAULT_TEXT_FONT
);
// super(game, 600, 300, "게임 오버", TimeOverText.DEFAULT_TEXT_FONT);
this.anchor.set(0.5);
this.inputEnabled = false;
var grd = this.context.createLinearGradient(0, 0, 0, this.height);
grd.addColorStop(0, '#FFD68E');
grd.addColorStop(1, '#B34C00');
this.fill = grd;
// this.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
this.stroke = '#000';
this.strokeThickness = 10;
this.alpha = 0;
var tweenAlpha = game.add.tween(this);
tweenAlpha.to( { alpha: 1 }, TimeOverText.TWEEN_ALPHA_TIME, Phaser.Easing.Linear.None, true);
var tweenMove = game.add.tween(this);
tweenMove.to( { y: game.world.height / 2 }, TimeOverText.TWEEN_MOVE_TIME, Phaser.Easing.Bounce.Out, true);
game.add.existing(this);
};
TimeOverText.DEFAULT_TEXT_FONT = {
font: "bold 100px Arial",
boundsAlignH: "center", // left, center. right
boundsAlignV: "middle", // top, middle, bottom
fill: "#fff"
};
TimeOverText.MOVE_AMOUNT_PX = 200;
TimeOverText.TWEEN_ALPHA_TIME = 1000;
TimeOverText.TWEEN_MOVE_TIME = 1500;