refactor: implement inventory item spawner and config
- Add cell and text styling constants to `GRID_CONFIG` - Replace manual item drawing in `InventoryTestScene` with `InventoryItemSpawner` - Update `InventoryTestScene` to use dynamic inventory dimensions for grid rendering - Register `InventoryTestScene` in the main `App` component
This commit is contained in:
@@ -4,6 +4,7 @@ import { MapViewerScene } from "@/scenes/MapViewerScene";
|
||||
import { GridViewerScene } from "@/scenes/GridViewerScene";
|
||||
import { ShapeViewerScene } from "@/scenes/ShapeViewerScene";
|
||||
import { GAME_CONFIG } from "@/config";
|
||||
import { InventoryTestScene } from "@/scenes/InventoryTestScene";
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
@@ -11,6 +12,7 @@ export default function App() {
|
||||
<div className="flex-1 flex relative justify-center items-center">
|
||||
<PhaserGame initialScene="IndexScene" config={GAME_CONFIG}>
|
||||
<PhaserScene scene={IndexScene} />
|
||||
<PhaserScene scene={InventoryTestScene} />
|
||||
<PhaserScene scene={MapViewerScene} />
|
||||
<PhaserScene scene={GridViewerScene} />
|
||||
<PhaserScene scene={ShapeViewerScene} />
|
||||
|
||||
Reference in New Issue
Block a user