Compare commits

...

1 Commits
main ... demo

Author SHA1 Message Date
fbe7fc4e2b init 2025-12-17 08:25:58 +08:00
9 changed files with 11 additions and 11 deletions

View File

@ -17,7 +17,9 @@ const gamePage = useTemplateRef('game-page');
function startExploration(payload: { region: string; store: string; username: string }) {
userData.value = payload;
stage.value = 1;
gamePage.value?.init();
setTimeout(() => {
gamePage.value?.init();
}, 1);
}
@ -104,23 +106,21 @@ const gameKey = ref(10)
<Loader class="page" v-if="stage == -1" @loaded="stage = 0"
style="z-index: 100;" />
<Loader class="page" v-if="stage == -1" @loaded="startExploration" style="z-index: 100;" />
<Transition name="fade" mode="out-in">
<Page1 class="page page-1" v-if="stage == 0" style="z-index: 99;"
@start-exploration="startExploration" />
<Page1 class="page page-1" v-if="stage == 0" style="z-index: 99;" @start-exploration="startExploration" />
</Transition>
<Game class="page" :userdata="userData" :key="gameKey" v-if="stage >= 0"
:style="{ opacity: stage === 1 ? 1 : 0 }" style="z-index: 98;"
@cloud-down="cloudDown" @cloud-up="cloudUp" ref="game-page" @restart="gameKey++" />
<Transition name="fade" mode="out-in">
<Game class="page" :userdata="userData" :key="gameKey" v-if="stage >= 0" :style="{ opacity: stage === 1 ? 1 : 0 }"
style="z-index: 98;" @cloud-down="cloudDown" @cloud-up="cloudUp" ref="game-page" @restart="gameKey++" />
</Transition>
<div class="overlay page">
<div class="bgm"
style="position: absolute; top: 16vw;right: 8vw;width: 8vw; cursor: pointer;pointer-events: all;">
<img src="./assets/开启音乐.webp" @click="playingBgm = false" alt=""
v-if="playingBgm">
<img src="./assets/开启音乐.webp" @click="playingBgm = false" alt="" v-if="playingBgm">
<img src="./assets/关掉音乐.webp" @click="playingBgm = true" alt="" v-else>
</div>
</div>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -603,7 +603,7 @@ window.addEventListener('keydown', (e) => {
<Transition name="fade">
<div class="game-end" v-if="gameState == GAME_STATE.gameEnd">
<GatheringCloud ref="gatheringCloud" />
<Button @click="startQuiz" class="start-quiz-btn">开始答题</Button>
</div>
</Transition>