Vixen
caa30e12
csharp
public sealed class UtilityMemory

The managed half of what an agent remembers, for a set that is an agent's whole planner.

Read the guide page for this →

Remarks

A thin holder over a UtilityState and a cooldown array. It exists so that AiSystem can keep one beside an agent's slot the way it keeps a BehaviorTreeInstance, without the arithmetic being written twice.

Fields and properties (4)

  • public ref UtilityState State

    The state the set reads and writes.

  • public int Current

    Which action is running, or -1 for none.

  • public int Decisions

    How many decisions it has made.

  • public Span<float> Cooldowns

    When each action last ended.

Methods (2)

  • public void Reset()

    Forgets everything, which is what a recycled agent slot needs.

  • public void Fit(int count)

    Makes room for a set's actions.

Used by (3)

  • AiSnapshotTestsVixen.Ai.Tests
  • AiSnapshotsVixen.Ai
  • AiSystemVixen.Ai