mirror of
https://github.com/Kugelschieber/breach.git
synced 2026-01-18 12:00:25 +00:00
Manage game state through object injection everywhere, fixed filling buffer and stopping clock in Game.
This commit is contained in:
@@ -10,11 +10,13 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {defineComponent, inject} from "vue";
|
||||
import { Game } from "@/game/Game";
|
||||
import {computed, defineComponent, inject, Ref} from "vue";
|
||||
|
||||
export default defineComponent({
|
||||
setup() {
|
||||
const sequences = inject("sequences");
|
||||
const game = inject("game") as Ref<Game>;
|
||||
const sequences = computed(() => game.value.sequences);
|
||||
|
||||
return {
|
||||
sequences
|
||||
|
||||
Reference in New Issue
Block a user