feat: initialize TRXTD browser tower defense
This commit is contained in:
commit
c4347f8420
34 changed files with 8302 additions and 0 deletions
60
src/App.vue
Normal file
60
src/App.vue
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<script setup lang="ts">
|
||||
import EndOverlay from '@/components/EndOverlay.vue'
|
||||
import GameCanvas from '@/components/GameCanvas.vue'
|
||||
import Hud from '@/components/Hud.vue'
|
||||
import LobbyScreen from '@/components/LobbyScreen.vue'
|
||||
import MPBar from '@/components/MPBar.vue'
|
||||
import ObstaclePanel from '@/components/ObstaclePanel.vue'
|
||||
import PauseOverlay from '@/components/PauseOverlay.vue'
|
||||
import PiPCanvas from '@/components/PiPCanvas.vue'
|
||||
import StartScreen from '@/components/StartScreen.vue'
|
||||
import TowerPanel from '@/components/TowerPanel.vue'
|
||||
import TowerShop from '@/components/TowerShop.vue'
|
||||
import { store } from '@/game/store'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="app">
|
||||
<StartScreen v-if="store.screen === 'menu'" />
|
||||
<LobbyScreen v-else-if="store.screen === 'lobby'" />
|
||||
<div v-else class="game-layout">
|
||||
<Hud />
|
||||
<MPBar />
|
||||
<div class="canvas-wrap">
|
||||
<div class="canvas-box">
|
||||
<GameCanvas />
|
||||
<TowerPanel />
|
||||
<ObstaclePanel />
|
||||
<PiPCanvas />
|
||||
<PauseOverlay />
|
||||
<EndOverlay />
|
||||
</div>
|
||||
</div>
|
||||
<TowerShop />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.app {
|
||||
height: 100dvh;
|
||||
overflow: hidden;
|
||||
}
|
||||
.game-layout {
|
||||
height: 100dvh;
|
||||
padding: 10px 12px 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
.canvas-wrap {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.canvas-box {
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue