Fix: move card position
This commit is contained in:
@@ -1,2 +1 @@
|
||||
let scoreManager = new ScoreManager();
|
||||
let heartManager = new HeartManager();
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
DudeCard = function(game, col, row, cardCharacters, clickedHandler) {
|
||||
DudeCard.prototype = Object.create(Phaser.Sprite.prototype);
|
||||
DudeCard.prototype.constructor = DudeCard;
|
||||
|
||||
function DudeCard(game, col, row, cardCharacters, clickedHandler) {
|
||||
this.cardIndex = row * DudeCard.MAX_CARD_COLUMN_NO + col;
|
||||
this.columnNo = col;
|
||||
this.rowNo = row;
|
||||
@@ -34,11 +37,6 @@ DudeCard = function(game, col, row, cardCharacters, clickedHandler) {
|
||||
game.add.existing(this);
|
||||
}
|
||||
|
||||
DudeCard.prototype = Object.create(Phaser.Sprite.prototype);
|
||||
DudeCard.prototype.constructor = DudeCard;
|
||||
DudeCard.prototype.update = function() {
|
||||
}
|
||||
|
||||
DudeCard.prototype.onDown = function(sprite) {
|
||||
if(this.isActivated == false)
|
||||
return;
|
||||
@@ -102,7 +100,7 @@ DudeCard.prototype.show = function(openCardColumnNo, openCardRowNo) {
|
||||
this.alpha = 1;
|
||||
|
||||
this.x = game.world.centerX - (((openCardColumnNo - 1) / 2) - this.columnNo) * 180;
|
||||
this.y = game.world.centerY + 70 - (((openCardRowNo - 1) / 2) - this.rowNo) * 160;
|
||||
this.y = game.world.centerY - (((openCardRowNo - 1) / 2) - this.rowNo) * 160;
|
||||
}
|
||||
|
||||
DudeCard.prototype.hide = function() {
|
||||
|
||||
@@ -38,9 +38,8 @@ var Game = {
|
||||
this.stageTimer = new StageTimer(
|
||||
Game.GAME_TIME_SEC,
|
||||
(function() {
|
||||
// self.isOnStage = false;
|
||||
// this.isOnStage = false;
|
||||
|
||||
// self.goResult();
|
||||
this.gameOver();
|
||||
}).bind(this)
|
||||
);
|
||||
@@ -100,9 +99,6 @@ var Game = {
|
||||
this.popupTween = null;
|
||||
this.startButton;
|
||||
|
||||
// this.leftTimeText;
|
||||
// this.leftTimeSec;
|
||||
|
||||
this.timeEvent;
|
||||
this.gameTimeEvents = [];
|
||||
|
||||
@@ -159,6 +155,7 @@ var Game = {
|
||||
location.href = '../../web/client/menu_app.html';
|
||||
},
|
||||
|
||||
/*
|
||||
countDown() {
|
||||
const style = { font: "bold 200px Arial", fill: "#fff", boundsAlignH: "center", boundsAlignV: "middle" };
|
||||
this.countDownText = game.add.text(0, 0, "", style);
|
||||
@@ -187,10 +184,10 @@ var Game = {
|
||||
|
||||
this.countDownNumber--;
|
||||
},
|
||||
*/
|
||||
|
||||
startGame: function() {
|
||||
this.playingStageNo = 1;
|
||||
// this.leftTimeSec = 0; // INIT_LEFT_TIME_MIN * 60;
|
||||
|
||||
this.startStage();
|
||||
this.stageTimer.start();
|
||||
@@ -205,24 +202,6 @@ var Game = {
|
||||
|
||||
this.initCards();
|
||||
this.initOpenCardInfo();
|
||||
|
||||
/*
|
||||
var bonusTime = this.getBonusTime();
|
||||
if(this.playingStageNo == 1)
|
||||
this.showStageNotice(this.playingStageNo + "단계 시작 (제한 시간 : " + this.bonusTime + "초)");
|
||||
else if(this.bonusTime == 0)
|
||||
this.showStageNotice(this.playingStageNo + "단계 시작");
|
||||
else
|
||||
this.showStageNotice(this.playingStageNo + "단계 시작 (보너스 +" + this.bonusTime + "초)");
|
||||
|
||||
this.leftTimeSec += this.bonusTime;
|
||||
*/
|
||||
|
||||
// this.leftTimeSec = Game.GAME_TIME_SEC;
|
||||
// this.updateLeftTime();
|
||||
|
||||
// if(this.playingStageNo == 1)
|
||||
// this.timeEvent = game.time.events.loop(1000, this.updateLeftTime, this);
|
||||
},
|
||||
|
||||
setOpenCardColumnRow() {
|
||||
@@ -554,5 +533,5 @@ var Game = {
|
||||
}
|
||||
|
||||
|
||||
Game.GAME_TIME_SEC = 6;
|
||||
Game.GAME_TIME_SEC = 60;
|
||||
Game.GAME_OVER_WAIT_TIME_MS = 2000;
|
||||
@@ -1,4 +0,0 @@
|
||||
function animateTextAlpha(targetText, startAlpha, endAlpha, msTime, effectType) {
|
||||
targetText.alpha = startAlpha;
|
||||
game.add.tween(targetText).to({alpha: endAlpha}, msTime, effectType, true);
|
||||
}
|
||||
Reference in New Issue
Block a user