mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2026-02-04 18:24:14 +02:00
added logic for end-game
This commit is contained in:
@@ -331,6 +331,12 @@ input[type="number"]::-webkit-outer-spin-button {
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.game-end {
|
||||||
|
pointer-events: none;
|
||||||
|
user-select: none;
|
||||||
|
filter: blur(5px);
|
||||||
|
}
|
||||||
|
|
||||||
.game-start {
|
.game-start {
|
||||||
pointer-events: unset !important;
|
pointer-events: unset !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<chat-component id="chat"></chat-component>
|
<chat-component id="chat"></chat-component>
|
||||||
|
|
||||||
<section class="saper">
|
<section class="saper" :class="{ 'game-end' : ValidationPlay.endGame }">
|
||||||
<div class="bg"></div>
|
<div class="bg"></div>
|
||||||
<div class="bg-two"></div>
|
<div class="bg-two"></div>
|
||||||
<div class="saper-start" :class="{ 'game-start__menu-off' : gameStart }">
|
<div class="saper-start" :class="{ 'game-start__menu-off' : gameStart }">
|
||||||
@@ -129,6 +129,10 @@
|
|||||||
<div class="start-game" v-if="ValidationPlay.startGame === true">
|
<div class="start-game" v-if="ValidationPlay.startGame === true">
|
||||||
<h2>Игра началась!</h2>
|
<h2>Игра началась!</h2>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="start-game" v-if="ValidationPlay.endGame === true">
|
||||||
|
<h2>Вы подорвались! Игра закончена</h2>
|
||||||
|
<a href="#" @click="updatePage()">Продолжить</a>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -172,6 +176,7 @@ export default {
|
|||||||
CrystalValidate: false,
|
CrystalValidate: false,
|
||||||
DiamondValidate: false,
|
DiamondValidate: false,
|
||||||
startGame: false,
|
startGame: false,
|
||||||
|
endGame: false,
|
||||||
},
|
},
|
||||||
modules: [ Navigation ]
|
modules: [ Navigation ]
|
||||||
}
|
}
|
||||||
@@ -268,11 +273,7 @@ export default {
|
|||||||
this.gamesCircle = this.gamesCircle + 1
|
this.gamesCircle = this.gamesCircle + 1
|
||||||
this.offEventPointers = true
|
this.offEventPointers = true
|
||||||
if (AnswerServer === 'You dead') {
|
if (AnswerServer === 'You dead') {
|
||||||
this.gameStart = false
|
this.ValidationPlay.endGame = true
|
||||||
this.offEventPointers = false
|
|
||||||
this.flippedCards = []
|
|
||||||
this.gamesCircle = 0
|
|
||||||
console.log(this.gameStart, this.offEventPointers)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,6 +325,9 @@ export default {
|
|||||||
this.offEventPointers = true
|
this.offEventPointers = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
updatePage() {
|
||||||
|
window.location.reload()
|
||||||
|
},
|
||||||
validationCheck() {
|
validationCheck() {
|
||||||
if (this.ValidationPlay.CrystalValidate === true && this.ValidationPlay.DiamondValidate === true) {
|
if (this.ValidationPlay.CrystalValidate === true && this.ValidationPlay.DiamondValidate === true) {
|
||||||
return true
|
return true
|
||||||
|
|||||||
Reference in New Issue
Block a user