added logic for card-count

This commit is contained in:
Kostya
2024-01-28 23:00:55 +03:00
parent 98a4399644
commit 3e8c5268fc
2 changed files with 14 additions and 9 deletions

View File

@@ -386,24 +386,26 @@ input[type="number"]::-webkit-outer-spin-button {
text-align: center; text-align: center;
font-family: "Montserrat Alternates"; font-family: "Montserrat Alternates";
font-size: 18px; font-size: 18px;
font-width: 700; font-weight: 700;
padding: 1% 1%; padding: 1% 1%;
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25); box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
border-radius: 25px; border-radius: 25px;
opacity: 0;
}
.on-element-card {
opacity: 1 !important;
transition: opacity .4s ease;
} }
.emeralds-bg { .emeralds-bg {
background: #6BC884; background: #6BC884;
/*top: -54px;*/
/*left: 20px;*/
top: -22%; top: -22%;
left: 12%; left: 12%;
} }
.crystals-bg { .crystals-bg {
background: #EF4444; background: #EF4444;
/*top: -52px;*/
/*left: 20px;*/
top: -20%; top: -20%;
left: 12%; left: 12%;
} }

View File

@@ -132,8 +132,8 @@
<h2>Изумруды</h2> <h2>Изумруды</h2>
<p>Открывай ячейки с изумрудами</p> <p>Открывай ячейки с изумрудами</p>
<img src="@/assets/icons-games/saper-game/icon-emeralds-saper.svg" width="170" height="170"> <img src="@/assets/icons-games/saper-game/icon-emeralds-saper.svg" width="170" height="170">
<div class="info-crystals__count card-style-count emeralds-bg"> <div class="info-crystals__count card-style-count emeralds-bg" :class="{ 'on-element-card' : gameStart === true }">
<h3>22</h3> <h3>{{ this.emeraldsAmount }}</h3>
</div> </div>
</div> </div>
</div> </div>
@@ -142,8 +142,8 @@
<h2>кристаллы</h2> <h2>кристаллы</h2>
<p>Остерегайся кристаллов, чтобы не проиграть</p> <p>Остерегайся кристаллов, чтобы не проиграть</p>
<img src="@/assets/icons-games/saper-game/icon-crystall-info-saper.svg" width="170" height="170"> <img src="@/assets/icons-games/saper-game/icon-crystall-info-saper.svg" width="170" height="170">
<div class="info-crystals__count card-style-count crystals-bg"> <div class="info-crystals__count card-style-count crystals-bg" :class="{ 'on-element-card' : gameStart === true }">
<h3>3</h3> <h3>{{ this.amountCrystals }}</h3>
</div> </div>
</div> </div>
</div> </div>
@@ -197,6 +197,7 @@ export default {
clickedBtn: '', clickedBtn: '',
clickedBtnCrystal : '', clickedBtnCrystal : '',
amountCrystals: 0, amountCrystals: 0,
emeraldsAmount: 0,
balance: 0, balance: 0,
winningAmount: 0, winningAmount: 0,
gamesCircle: 0, gamesCircle: 0,
@@ -322,6 +323,7 @@ export default {
this.CorrectsClick.push(X_Cordinates) this.CorrectsClick.push(X_Cordinates)
SoundUncorrect.play() SoundUncorrect.play()
this.emeraldsAmount--
} }
if (this.gamesCircle === maxCircles) { if (this.gamesCircle === maxCircles) {
this.offEventPointers = false this.offEventPointers = false
@@ -402,6 +404,7 @@ export default {
}) })
soundStartGame.play() soundStartGame.play()
this.emeraldsAmount = 25 - this.amountCrystals
} }
}, },
getBalanceUser() { getBalanceUser() {