Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fbe7fc4e2b |
18
src/App.vue
18
src/App.vue
@ -17,7 +17,9 @@ const gamePage = useTemplateRef('game-page');
|
|||||||
function startExploration(payload: { region: string; store: string; username: string }) {
|
function startExploration(payload: { region: string; store: string; username: string }) {
|
||||||
userData.value = payload;
|
userData.value = payload;
|
||||||
stage.value = 1;
|
stage.value = 1;
|
||||||
|
setTimeout(() => {
|
||||||
gamePage.value?.init();
|
gamePage.value?.init();
|
||||||
|
}, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -104,23 +106,21 @@ const gameKey = ref(10)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Loader class="page" v-if="stage == -1" @loaded="stage = 0"
|
<Loader class="page" v-if="stage == -1" @loaded="startExploration" style="z-index: 100;" />
|
||||||
style="z-index: 100;" />
|
|
||||||
|
|
||||||
<Transition name="fade" mode="out-in">
|
<Transition name="fade" mode="out-in">
|
||||||
<Page1 class="page page-1" v-if="stage == 0" style="z-index: 99;"
|
<Page1 class="page page-1" v-if="stage == 0" style="z-index: 99;" @start-exploration="startExploration" />
|
||||||
@start-exploration="startExploration" />
|
|
||||||
</Transition>
|
</Transition>
|
||||||
|
|
||||||
<Game class="page" :userdata="userData" :key="gameKey" v-if="stage >= 0"
|
<Transition name="fade" mode="out-in">
|
||||||
:style="{ opacity: stage === 1 ? 1 : 0 }" style="z-index: 98;"
|
<Game class="page" :userdata="userData" :key="gameKey" v-if="stage >= 0" :style="{ opacity: stage === 1 ? 1 : 0 }"
|
||||||
@cloud-down="cloudDown" @cloud-up="cloudUp" ref="game-page" @restart="gameKey++" />
|
style="z-index: 98;" @cloud-down="cloudDown" @cloud-up="cloudUp" ref="game-page" @restart="gameKey++" />
|
||||||
|
</Transition>
|
||||||
|
|
||||||
<div class="overlay page">
|
<div class="overlay page">
|
||||||
<div class="bgm"
|
<div class="bgm"
|
||||||
style="position: absolute; top: 16vw;right: 8vw;width: 8vw; cursor: pointer;pointer-events: all;">
|
style="position: absolute; top: 16vw;right: 8vw;width: 8vw; cursor: pointer;pointer-events: all;">
|
||||||
<img src="./assets/开启音乐.webp" @click="playingBgm = false" alt=""
|
<img src="./assets/开启音乐.webp" @click="playingBgm = false" alt="" v-if="playingBgm">
|
||||||
v-if="playingBgm">
|
|
||||||
<img src="./assets/关掉音乐.webp" @click="playingBgm = true" alt="" v-else>
|
<img src="./assets/关掉音乐.webp" @click="playingBgm = true" alt="" v-else>
|
||||||
</div>
|
</div>
|
||||||
</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.
Binary file not shown.
@ -603,7 +603,7 @@ window.addEventListener('keydown', (e) => {
|
|||||||
<Transition name="fade">
|
<Transition name="fade">
|
||||||
<div class="game-end" v-if="gameState == GAME_STATE.gameEnd">
|
<div class="game-end" v-if="gameState == GAME_STATE.gameEnd">
|
||||||
<GatheringCloud ref="gatheringCloud" />
|
<GatheringCloud ref="gatheringCloud" />
|
||||||
<Button @click="startQuiz" class="start-quiz-btn">开始答题</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</Transition>
|
</Transition>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user