Fix: apply IE code style
This commit is contained in:
@@ -71,7 +71,7 @@ var Game = {
|
|||||||
// // this.countDown();
|
// // this.countDown();
|
||||||
},
|
},
|
||||||
|
|
||||||
initVariables() {
|
initVariables: function() {
|
||||||
this.cards = [];
|
this.cards = [];
|
||||||
this.card_selected_edge;
|
this.card_selected_edge;
|
||||||
this.card_characters = [];
|
this.card_characters = [];
|
||||||
@@ -114,7 +114,7 @@ var Game = {
|
|||||||
this.randCharacterListAfterShuffling;
|
this.randCharacterListAfterShuffling;
|
||||||
},
|
},
|
||||||
|
|
||||||
initCardVariables() {
|
initCardVariables: function() {
|
||||||
this.card_characters[0] = 'commoner';
|
this.card_characters[0] = 'commoner';
|
||||||
this.card_characters[1] = 'elf';
|
this.card_characters[1] = 'elf';
|
||||||
this.card_characters[2] = 'knight';
|
this.card_characters[2] = 'knight';
|
||||||
@@ -162,7 +162,7 @@ var Game = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/*
|
/*
|
||||||
countDown() {
|
countDown: function() {
|
||||||
const style = { font: "bold 200px Arial", fill: "#fff", boundsAlignH: "center", boundsAlignV: "middle" };
|
const style = { font: "bold 200px Arial", fill: "#fff", boundsAlignH: "center", boundsAlignV: "middle" };
|
||||||
this.countDownText = game.add.text(0, 0, "", style);
|
this.countDownText = game.add.text(0, 0, "", style);
|
||||||
this.countDownText.setTextBounds(0, 0, game.world.width, game.world.height);
|
this.countDownText.setTextBounds(0, 0, game.world.width, game.world.height);
|
||||||
@@ -175,7 +175,7 @@ var Game = {
|
|||||||
this.tweenCountDown();
|
this.tweenCountDown();
|
||||||
},
|
},
|
||||||
|
|
||||||
tweenCountDown() {
|
tweenCountDown: function() {
|
||||||
if(this.countDownNumber === 0) {
|
if(this.countDownNumber === 0) {
|
||||||
this.startGame();
|
this.startGame();
|
||||||
return;
|
return;
|
||||||
@@ -199,7 +199,7 @@ var Game = {
|
|||||||
this.stageTimer.start();
|
this.stageTimer.start();
|
||||||
},
|
},
|
||||||
|
|
||||||
startStage() {
|
startStage: function() {
|
||||||
this.isCardSelected = false;
|
this.isCardSelected = false;
|
||||||
|
|
||||||
this.setOpenCardColumnRow();
|
this.setOpenCardColumnRow();
|
||||||
@@ -210,7 +210,7 @@ var Game = {
|
|||||||
this.initOpenCardInfo();
|
this.initOpenCardInfo();
|
||||||
},
|
},
|
||||||
|
|
||||||
setOpenCardColumnRow() {
|
setOpenCardColumnRow: function() {
|
||||||
switch(this.playingStageNo) {
|
switch(this.playingStageNo) {
|
||||||
case 1:
|
case 1:
|
||||||
this.activatedCardColumnNo = 2;
|
this.activatedCardColumnNo = 2;
|
||||||
@@ -243,7 +243,7 @@ var Game = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
initCards() {
|
initCards: function() {
|
||||||
this.randStageCharacterList = Phaser.ArrayUtils.shuffle(this.cardCharacterIndexList);
|
this.randStageCharacterList = Phaser.ArrayUtils.shuffle(this.cardCharacterIndexList);
|
||||||
|
|
||||||
var characterListBeforeShuffling = [];
|
var characterListBeforeShuffling = [];
|
||||||
@@ -271,14 +271,14 @@ var Game = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
initOpenCardInfo() {
|
initOpenCardInfo: function() {
|
||||||
this.openCardInfoIndex[0] = -1;
|
this.openCardInfoIndex[0] = -1;
|
||||||
this.openCardInfoCharacter[0] = -1;
|
this.openCardInfoCharacter[0] = -1;
|
||||||
this.openCardInfoIndex[1] = -1;
|
this.openCardInfoIndex[1] = -1;
|
||||||
this.openCardInfoCharacter[1] = -1;
|
this.openCardInfoCharacter[1] = -1;
|
||||||
},
|
},
|
||||||
|
|
||||||
hideSelectedCard() {
|
hideSelectedCard: function() {
|
||||||
this.isCardSelected = false;
|
this.isCardSelected = false;
|
||||||
|
|
||||||
this.card_selected_edge.x = -100;
|
this.card_selected_edge.x = -100;
|
||||||
@@ -378,17 +378,17 @@ var Game = {
|
|||||||
this.card_selected_edge.alpha = 1;
|
this.card_selected_edge.alpha = 1;
|
||||||
},
|
},
|
||||||
|
|
||||||
showOpenCardInfo() {
|
showOpenCardInfo: function() {
|
||||||
console.log(
|
console.log(
|
||||||
"card 1 (" + this.openCardInfoIndex[0] + ", : " + this.openCardInfoCharacter[0] + "), card 2 ("
|
"card 1 (" + this.openCardInfoIndex[0] + ", : " + this.openCardInfoCharacter[0] + "), card 2 ("
|
||||||
+ this.openCardInfoIndex[1] + ", " + this.openCardInfoCharacter[1] + ")");
|
+ this.openCardInfoIndex[1] + ", " + this.openCardInfoCharacter[1] + ")");
|
||||||
},
|
},
|
||||||
|
|
||||||
isCardSelectEdgeActivated() {
|
isCardSelectEdgeActivated: function() {
|
||||||
return this.isCardSelected;
|
return this.isCardSelected;
|
||||||
},
|
},
|
||||||
|
|
||||||
isCardSelectEdgeAll() {
|
isCardSelectEdgeAll: function() {
|
||||||
if(this.openCardInfoIndex[0] < 0)
|
if(this.openCardInfoIndex[0] < 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -399,7 +399,7 @@ var Game = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
isSameCharacterCard() {
|
isSameCharacterCard: function() {
|
||||||
if(this.openCardInfoIndex[0] < 0 || this.openCardInfoIndex[1] < 0)
|
if(this.openCardInfoIndex[0] < 0 || this.openCardInfoIndex[1] < 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -409,7 +409,7 @@ var Game = {
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
clearOpenedTwoCards() {
|
clearOpenedTwoCards: function() {
|
||||||
var card1 = this.cards[this.openCardInfoIndex[0]];
|
var card1 = this.cards[this.openCardInfoIndex[0]];
|
||||||
this.resetOpenCardInfo(card1.getColumnNo(), card1.getRowNo());
|
this.resetOpenCardInfo(card1.getColumnNo(), card1.getRowNo());
|
||||||
this.reservedHideCard[0] = card1;
|
this.reservedHideCard[0] = card1;
|
||||||
@@ -430,7 +430,7 @@ var Game = {
|
|||||||
this.gameTimeEvents[this.gameTimeEvents.length + 1] = hideOpenedCardTimeEvent;
|
this.gameTimeEvents[this.gameTimeEvents.length + 1] = hideOpenedCardTimeEvent;
|
||||||
},
|
},
|
||||||
|
|
||||||
hideOpenedCard() {
|
hideOpenedCard: function() {
|
||||||
this.reservedHideCard[0].hide();
|
this.reservedHideCard[0].hide();
|
||||||
this.reservedHideCard[1].hide();
|
this.reservedHideCard[1].hide();
|
||||||
|
|
||||||
@@ -449,7 +449,7 @@ var Game = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
resetOpenedCard() {
|
resetOpenedCard: function() {
|
||||||
var card1 = this.cards[this.openCardInfoIndex[0]];
|
var card1 = this.cards[this.openCardInfoIndex[0]];
|
||||||
if(card1 == null)
|
if(card1 == null)
|
||||||
return;
|
return;
|
||||||
@@ -464,7 +464,7 @@ var Game = {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
resetOpenedTwoCards() {
|
resetOpenedTwoCards: function() {
|
||||||
var resetOpenedCardTimeEvent = game.time.events.add(Phaser.Timer.SECOND * 0.5, this.resetOpenedCard, this);
|
var resetOpenedCardTimeEvent = game.time.events.add(Phaser.Timer.SECOND * 0.5, this.resetOpenedCard, this);
|
||||||
this.gameTimeEvents[this.gameTimeEvents.length + 1] = resetOpenedCardTimeEvent;
|
this.gameTimeEvents[this.gameTimeEvents.length + 1] = resetOpenedCardTimeEvent;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user