Fix: apply IE code style

This commit is contained in:
2018-10-25 12:26:48 +09:00
parent 69e76600d4
commit 52272d0ae5
+17 -17
View File
@@ -71,7 +71,7 @@ var Game = {
// // this.countDown();
},
initVariables() {
initVariables: function() {
this.cards = [];
this.card_selected_edge;
this.card_characters = [];
@@ -114,7 +114,7 @@ var Game = {
this.randCharacterListAfterShuffling;
},
initCardVariables() {
initCardVariables: function() {
this.card_characters[0] = 'commoner';
this.card_characters[1] = 'elf';
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" };
this.countDownText = game.add.text(0, 0, "", style);
this.countDownText.setTextBounds(0, 0, game.world.width, game.world.height);
@@ -175,7 +175,7 @@ var Game = {
this.tweenCountDown();
},
tweenCountDown() {
tweenCountDown: function() {
if(this.countDownNumber === 0) {
this.startGame();
return;
@@ -199,7 +199,7 @@ var Game = {
this.stageTimer.start();
},
startStage() {
startStage: function() {
this.isCardSelected = false;
this.setOpenCardColumnRow();
@@ -210,7 +210,7 @@ var Game = {
this.initOpenCardInfo();
},
setOpenCardColumnRow() {
setOpenCardColumnRow: function() {
switch(this.playingStageNo) {
case 1:
this.activatedCardColumnNo = 2;
@@ -243,7 +243,7 @@ var Game = {
}
},
initCards() {
initCards: function() {
this.randStageCharacterList = Phaser.ArrayUtils.shuffle(this.cardCharacterIndexList);
var characterListBeforeShuffling = [];
@@ -271,14 +271,14 @@ var Game = {
}
},
initOpenCardInfo() {
initOpenCardInfo: function() {
this.openCardInfoIndex[0] = -1;
this.openCardInfoCharacter[0] = -1;
this.openCardInfoIndex[1] = -1;
this.openCardInfoCharacter[1] = -1;
},
hideSelectedCard() {
hideSelectedCard: function() {
this.isCardSelected = false;
this.card_selected_edge.x = -100;
@@ -378,17 +378,17 @@ var Game = {
this.card_selected_edge.alpha = 1;
},
showOpenCardInfo() {
showOpenCardInfo: function() {
console.log(
"card 1 (" + this.openCardInfoIndex[0] + ", : " + this.openCardInfoCharacter[0] + "), card 2 ("
+ this.openCardInfoIndex[1] + ", " + this.openCardInfoCharacter[1] + ")");
},
isCardSelectEdgeActivated() {
isCardSelectEdgeActivated: function() {
return this.isCardSelected;
},
isCardSelectEdgeAll() {
isCardSelectEdgeAll: function() {
if(this.openCardInfoIndex[0] < 0)
return false;
@@ -399,7 +399,7 @@ var Game = {
},
isSameCharacterCard() {
isSameCharacterCard: function() {
if(this.openCardInfoIndex[0] < 0 || this.openCardInfoIndex[1] < 0)
return false;
@@ -409,7 +409,7 @@ var Game = {
return true;
},
clearOpenedTwoCards() {
clearOpenedTwoCards: function() {
var card1 = this.cards[this.openCardInfoIndex[0]];
this.resetOpenCardInfo(card1.getColumnNo(), card1.getRowNo());
this.reservedHideCard[0] = card1;
@@ -430,7 +430,7 @@ var Game = {
this.gameTimeEvents[this.gameTimeEvents.length + 1] = hideOpenedCardTimeEvent;
},
hideOpenedCard() {
hideOpenedCard: function() {
this.reservedHideCard[0].hide();
this.reservedHideCard[1].hide();
@@ -449,7 +449,7 @@ var Game = {
}
},
resetOpenedCard() {
resetOpenedCard: function() {
var card1 = this.cards[this.openCardInfoIndex[0]];
if(card1 == null)
return;
@@ -464,7 +464,7 @@ var Game = {
},
resetOpenedTwoCards() {
resetOpenedTwoCards: function() {
var resetOpenedCardTimeEvent = game.time.events.add(Phaser.Timer.SECOND * 0.5, this.resetOpenedCard, this);
this.gameTimeEvents[this.gameTimeEvents.length + 1] = resetOpenedCardTimeEvent;
},