Vixen
caa30e12
csharp
public readonly record struct PerceivedTarget

Something a listener knows about, and how it found out.

Read the guide page for this →

Remarks

⚠ LastKnownLocation is frozen when Current goes false, and that is the whole reason the list survives losing sight of something. "Search where he was" is otherwise a thing every game writes by hand — a component holding a position, a timer, and the code that decides when to throw both away — and every hand-written copy of it disagrees with the sense about when the target was actually lost.

Fields and properties (6)

  • public Entity Source

    What was perceived.

  • public AiSense Sense

    Which sense last reported it. Sight wins any tie.

  • public Vector3 LastKnownLocation

    Where it was when the sense last had it.

  • public float Strength

    What the source's Strength was then — how loud, how bright, how much damage.

  • public float Stamp

    The clock reading when the sense last had it.

  • public bool Current

    Whether the most recent pass perceived it, as opposed to remembering it.

Methods (2)

  • public PerceivedTarget(Entity Source, AiSense Sense, Vector3 LastKnownLocation, float Strength, float Stamp, bool Current)

    Something a listener knows about, and how it found out.

  • public float AgeAt(float now)

    How long ago the sense last had it, in seconds.

Used by (17)

  • AiGameplayDebuggerVixen.Ai.Diagnostics
  • EventSenseTestsVixen.Ai.Perception.Tests
  • FilterTestsVixen.Ai.Perception.Tests
  • NearestPerceivedInputVixen.Ai.Perception
  • NearestPerceivedSensorVixen.Ai.Perception
  • NearestPerceivedServiceVixen.Ai.Perception
  • PerceivedCountBindingVixen.Ai.Perception
  • PerceivedCountInputVixen.Ai.Perception
  • PerceivedCountSensorVixen.Ai.Perception
  • PerceivedTargetDecoratorVixen.Ai.Perception
  • PerceivedTargetsVixen.Ai.Perception
  • PerceptionNodeTestsVixen.Ai.Perception.Tests
  • PerceptionSnapshotsVixen.Ai.Perception
  • PerceptionSystemVixen.Ai.Perception
  • SightTestsVixen.Ai.Perception.Tests
  • TargetLocationAgeBindingVixen.Ai.Perception
  • TeamRelayTestsVixen.Ai.Perception.Tests