fix: arcade mode crash — kaplay go() defers scene init to next frame
CI / check (push) Failing after 7m34s

k.go('arcade') schedules the scene callback on frameEnd, not synchronously.
start() was called before fighters existed, causing "Cannot read properties
of undefined (reading 'obj')". Fix: await a readiness promise that resolves
once the scene callback has created the fighters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-04-11 20:17:10 +01:00
co-authored by Claude Opus 4.6
parent 32e6c19f72
commit fb35075b01
3 changed files with 13 additions and 4 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ export interface ArcadeCallbacks {
}
export interface ArcadeSceneController {
start: () => void
start: () => Promise<void>
pause: () => void
resume: () => void
destroy: () => void