refactor: 游戏地图接口重构

This commit is contained in:
AncTe committed 2026-08-21 01:39:47 +08:00
1 parent 1717400945
commit 7eeab32134
28 files changed
+1408 -1236

No files matched your search

@@ -8,12 +8,12 @@ import {
IReplayArray,
IReplayReadStream,
IReplaySandbox,
IReplaySandboxHook,
IReplaySandboxHooks,
IReplaySystem
} from './types';
export class ReplaySandbox
extends Hookable<IReplaySandboxHook>
extends Hookable<IReplaySandboxHooks>
implements IReplaySandbox
{
pausing: boolean = true;
@@ -41,8 +41,8 @@ export class ReplaySandbox
}
protected createController(
hook: Partial<IReplaySandboxHook>
): IHookController<IReplaySandboxHook> {
hook: Partial<IReplaySandboxHooks>
): IHookController<IReplaySandboxHooks> {
return new HookController(this, hook);
}
@@ -10,7 +10,7 @@ import {
IReplaySandbox,
IReplaySandboxConfig,
IReplaySystem,
IReplaySystemHook,
IReplaySystemHooks,
ReplayCommandWidth,
ReplayParamValue
} from './types';
@@ -18,7 +18,7 @@ import { ReplayArray } from './array';
import { ReplaySandbox } from './sandbox';
export class ReplaySystem
extends Hookable<IReplaySystemHook>
extends Hookable<IReplaySystemHooks>
implements IReplaySystem
{
replaying: boolean = false;
@@ -42,8 +42,8 @@ export class ReplaySystem
}
protected createController(
hook: Partial<IReplaySystemHook>
): IHookController<IReplaySystemHook> {
hook: Partial<IReplaySystemHooks>
): IHookController<IReplaySystemHooks> {
return new HookController(this, hook);
}
@@ -20,7 +20,7 @@ export interface IReplayCommand {
execute(step: IReplayStepHandler): Promise<boolean>;
}
export interface IReplaySandboxHook extends IHookBase {
export interface IReplaySandboxHooks extends IHookBase {
/**
* 当录像沙箱将某一步录像操作执行完毕后触发
* @param step 当前录像步信息
@@ -54,7 +54,7 @@ export interface IReplaySandboxHook extends IHookBase {
onResumeReplay?(): void;
}
export interface IReplaySandbox extends IHookable<IReplaySandboxHook> {
export interface IReplaySandbox extends IHookable<IReplaySandboxHooks> {
/** 是否处于暂停状态 */
readonly pausing: boolean;
/** 当前录像是否已经播放完毕 */
@@ -282,7 +282,7 @@ export interface IReplayArray {
): void;
}
export interface IReplaySystemHook extends IHookBase {
export interface IReplaySystemHooks extends IHookBase {
/**
* 当创建新的录像沙盒时触发
* @param sandbox 创建的录像沙盒
@@ -313,7 +313,7 @@ export interface IReplaySandboxConfig {
save?: Map<string, unknown>;
}
export interface IReplaySystem extends IHookable<IReplaySystemHook> {
export interface IReplaySystem extends IHookable<IReplaySystemHooks> {
/** 当前是否处在录像播放状态 */
readonly replaying: boolean;
/** 当前正在播放的录像沙箱实例 */