Introduce a mechanism to manage components on a shared, lazily-created singleton entity. This simplifies access to global state by providing dedicated methods for adding, removing, getting, and checking for singleton components. Refactor the Tetris example to utilize this new singleton pattern for game state components like Board, Score, and Piece. |
||
|---|---|---|
| .. | ||
| commands.ts | ||
| components.ts | ||
| game.ts | ||
| input.ts | ||
| main.ts | ||
| render.ts | ||