chore: 调整 DefaultHeroMoveTopImpl 的构造器参数

This commit is contained in:
unanmed 2026-06-30 00:06:57 +08:00
parent 3d72954bb2
commit 94a16b31ba
2 changed files with 11 additions and 11 deletions

View File

@ -210,10 +210,7 @@ export class CoreState implements ICoreState {
}); });
// 勇士顶层初始化 // 勇士顶层初始化
const heroMoveTopImpl = new DefaultHeroMoveTopImpl( const heroMoveTopImpl = new DefaultHeroMoveTopImpl(this);
this,
this.triggerCollector
);
this.hero.location.mover.useTopImplementation(heroMoveTopImpl); this.hero.location.mover.useTopImplementation(heroMoveTopImpl);
//#endregion //#endregion

View File

@ -1,22 +1,25 @@
import { import {
IHeroMoveTopHandler, IHeroMoveTopHandler,
IHeroMoveTopImpl, IHeroMoveTopImpl,
IMapStore, IMapStore
IStateBase
} from '@user/data-base'; } from '@user/data-base';
import { FaceDirection, PassBit } from '@user/data-common'; import { FaceDirection, PassBit } from '@user/data-common';
import { ITriggerCollector, ITriggerHandler } from '@user/data-system'; import {
IStateSystem,
ITriggerCollector,
ITriggerHandler
} from '@user/data-system';
import { isNil } from 'lodash-es'; import { isNil } from 'lodash-es';
export class DefaultHeroMoveTopImpl implements IHeroMoveTopImpl { export class DefaultHeroMoveTopImpl implements IHeroMoveTopImpl {
/** 地图存储对象 */ /** 地图存储对象 */
private readonly maps: IMapStore; private readonly maps: IMapStore;
/** 触发器收集器对象 */
private readonly collector: ITriggerCollector;
constructor( constructor(private readonly state: IStateSystem) {
private readonly state: IStateBase,
private readonly collector: ITriggerCollector
) {
this.maps = state.maps; this.maps = state.maps;
this.collector = state.triggerCollector;
} }
//#region 通行性判断 //#region 通行性判断