csharp
public sealed class PatrolTaskWalks a route from the entity's own PatrolRoute.
Remarks
doc 37 § Part 3's Patrol. The route is the level's data and the task is the asset's: one tree runs every guard in the game and each of them carries the corridor it walks, so there is no tree per route.
⚠ Only Forward ever succeeds. A loop and a ping-pong have no end, so they stay Running for ever and are meant to be interrupted — by a decorator observing a perception key, which is the whole shape of a patrolling guard.
Fields and properties (1)
public static int StateSizeHow many bytes it needs.
Methods (4)
public PatrolTask(float acceptance = 1.5)Walks a route from the entity's own PatrolRoute.
public void Start(in AgentContext context, Span<byte> state)Begins. Called once before the first Tick, on a zeroed span.
public ActionStatus Tick(in AgentContext context, Span<byte> state, float delta)Advances it.
public void Abort(in AgentContext context, Span<byte> state)Stops it early. The span is zeroed afterwards; this is for what is outside it.
Used by (4)
- VillageAiVillage
- PatrolTestsVixen.Ai.Nodes.Tests
- VillageVixen.Ai.Nodes.Tests
- WorldNodesVixen.Ai.Nodes