refactor: details

This commit is contained in:
hyper
2026-04-12 16:31:10 +08:00
parent 59fa0e6122
commit f8a19653ba
2 changed files with 4 additions and 5 deletions
+2 -3
View File
@@ -1,10 +1,9 @@
import {useComputed} from '@preact/signals';
import { createGameHost, type GameModule } from 'boardgame-core';
import Phaser from 'phaser';
import { h } from 'preact';
import { PhaserGame, PhaserScene } from 'boardgame-phaser';
import {PhaserGame, PhaserScene, ReactiveScene} from 'boardgame-phaser';
export default function App<TState extends Record<string, unknown>>(props: { gameModule: GameModule<TState>, gameScene: { new(): Phaser.Scene } }) {
export default function App<TState extends Record<string, unknown>>(props: { gameModule: GameModule<TState>, gameScene: { new(): ReactiveScene } }) {
const gameHost = useComputed(() => {
const gameHost = createGameHost(props.gameModule);