fix: api changes fix
This commit is contained in:
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user