Commit 439fd438 authored by Mahmoud Aglan's avatar Mahmoud Aglan

fix: register ludo unmountGame to clean up timers on scene exit

Without this, the render loop, polling, heartbeat, and turn timers
would continue running after navigating away from the game scene.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent ac959931
import * as scene from '../../core/scene.js'; import * as scene from '../../core/scene.js';
import { mountGame } from './scenes/game.js'; import { mountGame, unmountGame } from './scenes/game.js';
import { mountResult } from './scenes/result.js'; import { mountResult } from './scenes/result.js';
import { mountRoom, unmountRoom } from './scenes/room.js'; import { mountRoom, unmountRoom } from './scenes/room.js';
scene.register('ludo-game', mountGame); scene.register('ludo-game', mountGame, unmountGame);
scene.register('ludo-result', mountResult); scene.register('ludo-result', mountResult);
scene.register('ludo-room', mountRoom, unmountRoom); scene.register('ludo-room', mountRoom, unmountRoom);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment