feat: Enhance win effects and animations in OfflineView component
This commit is contained in:
@@ -47,28 +47,28 @@ const spin = (): void => {
|
||||
const base1 = base0 + gap;
|
||||
const base2 = base1 + gap;
|
||||
setTimeout(() => {
|
||||
reelStates.value[0].isSpinning = false;
|
||||
reelStates.value[0]!!.isSpinning = false;
|
||||
}, base0);
|
||||
setTimeout(() => {
|
||||
reelStates.value[1].isSpinning = false;
|
||||
reelStates.value[1]!!.isSpinning = false;
|
||||
}, base1);
|
||||
setTimeout(() => {
|
||||
const firstTwoMatch = reelStates.value[0].value === reelStates.value[1].value &&
|
||||
reelStates.value[0].value !== '❓';
|
||||
const firstTwoMatch = reelStates.value[0]!!.value === reelStates!!.value[1]!!.value &&
|
||||
reelStates.value[0]!!.value !== '❓';
|
||||
const extraDelay = firstTwoMatch ? 1000 : 0;
|
||||
|
||||
glowThird.value = firstTwoMatch;
|
||||
|
||||
setTimeout(() => {
|
||||
reelStates.value[2].isSpinning = false;
|
||||
reelStates.value[2]!!.isSpinning = false;
|
||||
glowThird.value = false;
|
||||
globalSpinning.value = false;
|
||||
hasSpun.value = true;
|
||||
|
||||
const allThreeMatch =
|
||||
reelStates.value[0].value !== '❓' &&
|
||||
reelStates.value[0].value === reelStates.value[1].value &&
|
||||
reelStates.value[1].value === reelStates.value[2].value;
|
||||
reelStates.value[0]!!.value !== '❓' &&
|
||||
reelStates.value[0]!!.value === reelStates.value[1]!!.value &&
|
||||
reelStates.value[1]!!.value === reelStates.value[2]!!.value;
|
||||
if (allThreeMatch) {
|
||||
winFire.value = true;
|
||||
winBlink.value = true;
|
||||
|
||||
Reference in New Issue
Block a user