AStar returns cell instead of path

This commit is contained in:
evanpelle
2024-12-03 14:35:09 -08:00
parent 330b6b93cb
commit 4edd66dc1f
12 changed files with 57 additions and 59 deletions
+2 -1
View File
@@ -5,7 +5,7 @@ import { PathFindResultType } from "../pathfinding/AStar";
export class ShellExecution implements Execution {
private active = true
private pathFinder = PathFinder.Serial(2000, () => true, 10)
private pathFinder: PathFinder
private shell: MutableUnit
constructor(private spawn: Tile, private _owner: MutablePlayer, private target: MutableUnit) {
@@ -13,6 +13,7 @@ export class ShellExecution implements Execution {
}
init(mg: MutableGame, ticks: number): void {
this.pathFinder = PathFinder.Serial(mg, 2000, () => true, 10)
}
tick(ticks: number): void {