mirror of
https://github.com/motajs/template.git
synced 2026-11-03 15:34:31 +08:00
feat: 寻路系统接线
This commit is contained in:
1 parent
2ba3089c9a
commit
1ff22dd07d
2 files changed
+13
-6
No files matched your search
@@ -1 +1 @@
|
||||
{"isolation":"none","harness_flag":null,"phase":"06","plan":null,"written_at":1789346124877}
|
||||
{"isolation":"none","harness_flag":null,"phase":"7","plan":null,"written_at":1789461142586}
|
||||
@@ -81,7 +81,7 @@ import {
|
||||
TileLegacyBridge
|
||||
} from './legacy';
|
||||
import { isNil } from 'lodash-es';
|
||||
import { DefaultHeroMoveTopImpl } from './hero';
|
||||
import { DefaultHeroMoveTopImpl, DefaultPassPredicateImpl } from './hero';
|
||||
import { createEventRegistrations } from './event/registrations';
|
||||
import {
|
||||
ReplayEquipCommand,
|
||||
@@ -229,6 +229,17 @@ export class CoreState implements ICoreState {
|
||||
// 录像系统
|
||||
this.replaySystem = new ReplaySystem();
|
||||
|
||||
// 寻路系统
|
||||
const pathfinding = new PathfindingSystem(this);
|
||||
this.pathfinding = pathfinding;
|
||||
pathfinding.useMover(this.hero.location.mover);
|
||||
pathfinding.finder.useMapState(this.maps);
|
||||
// 初始状态下勇士不在任何楼层,切换楼层后再具体设置
|
||||
pathfinding.finder.useMapLayer(null);
|
||||
pathfinding.finder.usePassPredicate(
|
||||
new DefaultPassPredicateImpl(this.maps)
|
||||
);
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region L3 初始化
|
||||
@@ -259,10 +270,6 @@ export class CoreState implements ICoreState {
|
||||
const heroMoveTopImpl = new DefaultHeroMoveTopImpl(this);
|
||||
this.hero.location.mover.useTopImplementation(heroMoveTopImpl);
|
||||
|
||||
const pathfinding = new PathfindingSystem(this);
|
||||
pathfinding.useMover(this.hero.location.mover);
|
||||
this.pathfinding = pathfinding;
|
||||
|
||||
// 录像系统初始化注册
|
||||
this.registerReplayCommands();
|
||||
|
||||
|
||||
Reference in new issue
Block a user