refactor: expose addInterruption
This commit is contained in:
@@ -15,6 +15,10 @@ export abstract class GameHostScene<TState extends Record<string, unknown>>
|
||||
{
|
||||
protected disposables = new DisposableBag();
|
||||
protected gameHost!: GameHost<TState>;
|
||||
|
||||
addInterruption(promise: Promise<void>){
|
||||
this.gameHost?.addInterruption(promise);
|
||||
}
|
||||
|
||||
init(data: GameHostSceneOptions<TState>): void {
|
||||
this.gameHost = data.gameHost;
|
||||
@@ -29,7 +33,7 @@ export abstract class GameHostScene<TState extends Record<string, unknown>>
|
||||
}
|
||||
|
||||
/** 获取当前状态的只读快照 */
|
||||
protected get state(): TState {
|
||||
public get state(): TState {
|
||||
return this.gameHost.state.value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user