csharp
public sealed class LoopDecoratorRuns the node again: a fixed number of times, until it fails, or until a timeout.
Fields and properties (1)
public override int StateSizeHow many bytes of per-agent state it needs.
Methods (6)
public LoopDecorator(int times)Loops a fixed number of times.
public static LoopDecorator UntilFailure(float timeoutSeconds = 0)Loops until the node fails.
public static LoopDecorator Forever(float timeoutSeconds)Loops for ever, with a timeout.
public override bool Evaluate(in BehaviorContext context, ReadOnlySpan<byte> state)Whether the node may be entered, or may keep running.
public override void Enter(in BehaviorContext context, Span<byte> state)The node is being entered.
public override bool ShouldRepeat(in BehaviorContext context, Span<byte> state, ActionStatus result)Whether the node should run again instead of returning.
Used by (2)
- BehaviorTreeDecoratorTestsVixen.Ai.Tests
- BuildStateVixen.Ai