src/core/Game.tsimport { Application, Container } from 'pixi.js';import * as TWEEN from '@tweenjs/tween.js';import { COLORS } from '../constants';import { InputManager } from '../systems/InputManager';import { AudioManager } from '../systems/AudioManager';import { AssetManager } from '../systems/AssetManager';import { PhysicsWorld } from '../systems/PhysicsWorld';import { SceneManager } from './SceneManager';/*** Top-level game orchestrator. Owns the PIXI application, systems (input,* audio, physics, assets), and the scene manager.** Lifecycle:* const game = new Game();* await game.init(rootElement); // bootstraps PIXI + Rapier* await game.scenes.switch(MenuScene);** The render loop is driven by PIXI's ticker; per-frame logic delegates to* SceneManager.update(dt). The canvas auto-resizes to the parent and propagates
Showing the first 20 lines.
Get full code