Skip to content

PathNodeModel ​

An unused model entity that visualizes zombie pathfinding by displaying path cost and movement direction at a fixed position, presumably for internal testing uses.

PathNodeModel ​

Extends ModelEntity.

Properties ​

PropertyTypeDescription
lastCostnumberPath cost of the last tick.
lastDirectionnumberNumber representing movement direction of the last tick.
textTextEntityThe text entity displaying path cost.
text2TextEntityThe text entity displaying movement direction.

Methods ​

constructor() ​

ts
function constructor(): void

Initializes the path node model and creates text and text2. Defaults lastCost and lastDirection to -1.

update() ​

ts
function update(dt: number, user: any): void

Updates the model every frame. If tick.pathCost or tick.direction is different from lastCost or lastDirection, it updates text and lastCost from tick.pathCost, and text2 and lastDirection from tick.direction. Conversion between tick.direction and text displayed in text2 is shown as follows:

tick.directionDisplayed Text
0→
1←
2↓
3↑
4↘
5↙
6↖
7↗