// 全局 game 实例引用（避免 main ↔ DebugPanel 循环依赖）。

import Phaser from 'phaser';

export const gameRef: { game: Phaser.Game | null } = { game: null };

export function setGame(g: Phaser.Game): void {
  gameRef.game = g;
}
