diff --git a/src/components/AniEle.vue b/src/components/AniEle.vue index 638028f..3eb5304 100644 --- a/src/components/AniEle.vue +++ b/src/components/AniEle.vue @@ -7,7 +7,6 @@ import { ref, onMounted, onBeforeUnmount, watch } from 'vue' import JSZip from 'jszip' -// Props (接口定义不变) interface AnimationRule { name: string frame: number diff --git a/src/pages/Game.vue b/src/pages/Game.vue index 6258d82..35c2d70 100644 --- a/src/pages/Game.vue +++ b/src/pages/Game.vue @@ -12,6 +12,7 @@ import Quiz from './Game/Quiz.vue'; defineExpose({ init: () => { shootNotice.value?.jumpTo('蓄力'); + sunEle.value?.jumpTo('起飞前'); } }) @@ -429,6 +430,7 @@ async function gameEnd() { await wait(1800) showEndAni.value = true; + sunEndEle.value?.jumpTo('进入'); } @@ -477,6 +479,15 @@ async function finishCollect() { }).finished await sunEndEle.value?.jumpToSoftly('落下进蹦床'); + + document.querySelector('.bg-fireworks')?.animate([ + { opacity: 1 }, + { opacity: 0 }, + ], { + duration: 300, + easing: 'ease-in-out', + fill: 'forwards', + }).finished await document.querySelector('.bar-container')?.animate([ { transform: 'translateY(300%)' }], { duration: 500, @@ -563,7 +574,7 @@ window.addEventListener('keydown', (e) => { { name: '蓄力飞', frame: 181, loop: 1, pauseAfter: false, duration: 33 }, { name: '天上飞', frame: 90, loop: 0, pauseAfter: true, duration: 33 }, { name: '落下', frame: 382, loop: 1, pauseAfter: false, duration: 33 }, - ]" style="width: 100%; height: auto;" /> + ]" style="width: 100%; height: auto;" :auto-play="false" /> @@ -590,7 +601,7 @@ window.addEventListener('keydown', (e) => {