From 52272d0ae53456d1eb1085bc4f52acbfa30c61eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=A2=E1=84=91=E1=85=B3=E1=86=AF=20=E1=84=82?= =?UTF-8?q?=E1=85=A9=E1=84=90=E1=85=B3=E1=84=87=E1=85=AE=E1=86=A8?= Date: Thu, 25 Oct 2018 12:26:48 +0900 Subject: [PATCH] Fix: apply IE code style --- src/game/mouse/card_matching/game.js | 34 ++++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/game/mouse/card_matching/game.js b/src/game/mouse/card_matching/game.js index 103e6cf..e29bf77 100644 --- a/src/game/mouse/card_matching/game.js +++ b/src/game/mouse/card_matching/game.js @@ -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; },