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