2021-07-30 18:18:04 +00:00
|
|
|
<template>
|
2021-08-15 16:52:15 +00:00
|
|
|
<div class="page-play">
|
2021-08-30 10:48:54 +00:00
|
|
|
<div class="page-play__container">
|
|
|
|
<div class="page-play__container-game">
|
|
|
|
<div class="page-play__gamecontrols">
|
|
|
|
<GameControls />
|
|
|
|
</div>
|
|
|
|
<div class="page-play__area">
|
|
|
|
<div v-if="gameState === 'idle'" class="page-play__waiting">
|
|
|
|
waiting for gamemaster to start game ...
|
|
|
|
</div>
|
|
|
|
<ReadySet v-if="gameState === 'ready-set'" :text="gamePhase" />
|
|
|
|
<Play v-if="gameState === 'play'" />
|
2021-09-21 05:57:15 +00:00
|
|
|
<Final v-if="gameState === 'final'" />
|
2021-08-30 10:48:54 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="page-play__container-debug">
|
|
|
|
<EngineDebug />
|
2021-08-15 20:04:24 +00:00
|
|
|
</div>
|
2021-08-13 20:39:49 +00:00
|
|
|
</div>
|
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 {
|
2021-08-30 10:48:54 +00:00
|
|
|
width: 100%;
|
2021-09-21 05:57:15 +00:00
|
|
|
height: 100%;
|
2021-08-30 10:48:54 +00:00
|
|
|
|
|
|
|
&__container {
|
|
|
|
display: flex;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
&-game {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
&-debug {
|
|
|
|
max-width: 350px;
|
|
|
|
max-height: 100%;
|
|
|
|
}
|
|
|
|
}
|
2021-08-15 20:04:24 +00:00
|
|
|
|
|
|
|
&__controls {
|
|
|
|
flex: 0 1 auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__area {
|
|
|
|
flex: 1 1 auto;
|
|
|
|
}
|
|
|
|
|
2021-08-15 16:52:15 +00:00
|
|
|
&__waiting {
|
|
|
|
margin-top: 60px;
|
|
|
|
text-align: center;
|
|
|
|
font-family: Dosis;
|
|
|
|
font-size: 24px;
|
|
|
|
color: #ffffff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|