mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 12:19:31 +02:00
added logic for return old-game and fixed bug with upd balance if game-over
This commit is contained in:
@@ -242,7 +242,7 @@ export default {
|
|||||||
async handler(value) {
|
async handler(value) {
|
||||||
if (value.length < 1 || this.ValidationPlay.endGame === true) return
|
if (value.length < 1 || this.ValidationPlay.endGame === true) return
|
||||||
const maxCircles = 25 - this.amountCrystals
|
const maxCircles = 25 - this.amountCrystals
|
||||||
console.log(maxCircles)
|
console.log(`MAXCIRLES - ${maxCircles} VALUE: ${value} GAMECIRCLE - ${this.gamesCircle}`)
|
||||||
|
|
||||||
if (this.gameStart !== false) {
|
if (this.gameStart !== false) {
|
||||||
this.offEventPointers = false
|
this.offEventPointers = false
|
||||||
@@ -307,7 +307,7 @@ export default {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.ValidationPlay.endGame = false
|
this.ValidationPlay.endGame = false
|
||||||
}, 1200)
|
}, 1200)
|
||||||
return this.$emit('Updatebalance')
|
return eventBus.emit('Updatebalance')
|
||||||
}
|
}
|
||||||
const SoundUncorrect = new Howl({
|
const SoundUncorrect = new Howl({
|
||||||
src: ['/sounds/correct-click.mp3'],
|
src: ['/sounds/correct-click.mp3'],
|
||||||
@@ -350,6 +350,17 @@ export default {
|
|||||||
|
|
||||||
this.ValidationPlay.startGame = true
|
this.ValidationPlay.startGame = true
|
||||||
|
|
||||||
|
this.amountCrystals = response.MinesCount
|
||||||
|
this.amountDeposit = response.PuttedMoney
|
||||||
|
this.winningAmount = response.WinningMoney
|
||||||
|
|
||||||
|
const soundStartGame = new Howl({
|
||||||
|
src: ['/sounds/start-game.mp3'],
|
||||||
|
volume: 5.0
|
||||||
|
})
|
||||||
|
|
||||||
|
soundStartGame.play()
|
||||||
|
console.log(this.flippedCards.length)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.ValidationPlay.startGame = false
|
this.ValidationPlay.startGame = false
|
||||||
}, 2000)
|
}, 2000)
|
||||||
|
|||||||
Reference in New Issue
Block a user