mirror of
https://github.com/motajs/template.git
synced 2026-07-17 01:11:09 +08:00
chore: 调整 DefaultHeroMoveTopImpl 的构造器参数
This commit is contained in:
parent
3d72954bb2
commit
94a16b31ba
@ -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
|
||||||
|
|||||||
@ -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 通行性判断
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user