src/core/Scene.tsimport { Container } from 'pixi.js';import type { Game } from './Game';/*** Base class for all scenes. A scene is a `Container` (it owns a subtree of* display objects) plus four lifecycle hooks the SceneManager will call:** enter(data) — called once after construction, before first render* update(deltaSeconds) — called every frame while active* resize(width, height) — called whenever the viewport changes (and once after enter)* exit() — called once before the scene is removed and destroyed** Scenes have full access to `game` (the PIXI app, systems, scene manager,* etc.) — see core/Game.ts for the surface area.*/export abstract class Scene<EnterData = unknown> extends Container {constructor(public game: Game) {super();}
Showing the first 20 lines.
Get full code