fix: api changes fix

This commit is contained in:
2026-04-04 23:14:30 +08:00
parent c85fdb604c
commit 61857b8256
3 changed files with 25 additions and 15 deletions
@@ -18,11 +18,11 @@ export abstract class GameHostScene<TState extends Record<string, unknown>>
public get gameHost(): GameHost<TState> {
return this._gameHost;
}
addInterruption(promise: Promise<void>){
this.gameHost?.addInterruption(promise);
}
addTweenInterruption(tween: Phaser.Tweens.Tween){
this.addInterruption(new Promise(
resolve => tween.once('complete', resolve)
@@ -43,7 +43,7 @@ export abstract class GameHostScene<TState extends Record<string, unknown>>
/** 获取当前状态的只读快照 */
public get state(): TState {
return this.gameHost.state.value;
return this.gameHost.context.value;
}
public addDisposable(disposable: IDisposable){