2021-07-30 18:18:04 +00:00
|
|
|
<template>
|
2021-08-15 16:52:15 +00:00
|
|
|
<div class="page-play">
|
2021-08-12 22:12:04 +00:00
|
|
|
<GameControls />
|
|
|
|
<EngineDebug />
|
2021-08-15 16:52:15 +00:00
|
|
|
<div v-if="gameState === 'idle'" class="page-play__waiting">
|
|
|
|
waiting for gamemaster to start game ...
|
2021-08-13 20:39:49 +00:00
|
|
|
</div>
|
2021-08-15 16:52:15 +00:00
|
|
|
<ReadySet v-if="gameState === 'ready-set'" :text="gamePhase" />
|
|
|
|
<Play v-if="gameState === 'play'" />
|
2021-07-30 18:18:04 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2021-08-05 00:22:28 +00:00
|
|
|
async mounted() {
|
|
|
|
await this.$engine.start()
|
2021-07-30 18:18:04 +00:00
|
|
|
},
|
2021-08-12 21:08:17 +00:00
|
|
|
async beforeDestroy() {
|
|
|
|
await this.$engine.stop()
|
|
|
|
},
|
2021-08-13 20:39:49 +00:00
|
|
|
computed: {
|
|
|
|
gameState() {
|
|
|
|
return this.$store.state.game.state
|
|
|
|
},
|
|
|
|
gamePhase() {
|
|
|
|
return this.$store.state.game.phase
|
|
|
|
},
|
|
|
|
},
|
2021-07-30 18:18:04 +00:00
|
|
|
}
|
|
|
|
</script>
|
2021-08-15 16:52:15 +00:00
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
.page-play {
|
|
|
|
&__waiting {
|
|
|
|
margin-top: 60px;
|
|
|
|
text-align: center;
|
|
|
|
font-family: Dosis;
|
|
|
|
font-size: 24px;
|
|
|
|
color: #ffffff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|