added logic for off/on pointer-events if start-game, saper

This commit is contained in:
Kostya
2024-01-21 10:00:28 +03:00
parent 29806252e3
commit 442f38b1a6
2 changed files with 19 additions and 6 deletions

View File

@@ -331,6 +331,14 @@ input[type="number"]::-webkit-outer-spin-button {
pointer-events: none;
}
.game-start {
pointer-events: unset !important;
}
.game-start__menu-off {
pointer-events: none;
}
.hidden {
opacity: 0 !important;
}

View File

@@ -9,7 +9,7 @@
<section class="saper">
<div class="bg"></div>
<div class="bg-two"></div>
<div class="saper-start">
<div class="saper-start" :class="{ 'game-start__menu-off' : gameStart }">
<div class="saper-start__content title-saper padding-elements">
<h2>Сапёр</h2>
<p>Находи изумруды на поле и избегай кристалы</p>
@@ -61,7 +61,7 @@
</div>
<div class="saper-game">
<div class="saper-game__content">
<div class="game">
<div class="game" :class="{ 'game-start' : gameStart }">
<div class="circles__content">
<img src="@/assets/icons-games/saper-game/circles.png" class="circles circles-1">
<img src="@/assets/icons-games/saper-game/circles.png" class="circles circles-2">
@@ -161,6 +161,7 @@ export default {
amountSaveCrystals: 0,
balance: 0,
ErrorClick: '',
gameStart: false,
amountDeposit: 0,
amountSaveDeposit: 0,
flippedCards: [],
@@ -235,10 +236,8 @@ export default {
this.errorPlayButton()
}
else {
this.ValidationPlay.startGame = true
setTimeout(() => {
this.ValidationPlay.startGame = false
}, 1500)
this.playNotification()
this.gameStart = true
}
},
validationCheck() {
@@ -246,6 +245,12 @@ export default {
return true
}
},
playNotification() {
this.ValidationPlay.startGame = true
setTimeout(() => {
this.ValidationPlay.startGame = false
}, 1500)
},
errorPlayButton() {
this.ErrorClick = true
setTimeout(() => {