public sealed class PerceivedTargetsWhat one listener currently knows, and what it has not forgotten yet.
Remarks
One of these lives beside each listener's slot in PerceptionSystem, for the reason a blackboard does: it is a managed object with a list in it, which is not a thing that goes in a chunk column.
Bounded, and it drops the oldest. MaxPerceived is what keeps an agent standing in a crowd from growing a list the size of the crowd — and dropping the oldest rather than refusing the newest is what stops a stale memory from locking out the thing that just shot at it.
Fields and properties (2)
public int CountHow many it holds, remembered ones included.
public ReadOnlySpan<PerceivedTarget> TargetsEverything it knows about, in no particular order.
Methods (7)
public bool TryGet(Entity source, out PerceivedTarget target)What it knows about one entity.
public bool IsPerceiving(SenseMask senses)Whether it is perceiving anything at all through a sense right now.
public bool TryNearest(SenseMask senses, Vector3 from, out PerceivedTarget target, bool currentOnly = true)The nearest thing it knows about.
public bool TryFreshest(SenseMask senses, out PerceivedTarget target)The freshest thing it knows about, current or remembered.
public bool TryShout(out PerceivedTarget target)The one thing this listener would shout to an ally.
public bool WasPerceived(Entity source, AiSense sense)Whether a sense had this source when the current pass began.
public void Clear()Forgets everything.
Used by (19)
- AiGameplayDebuggerVixen.Ai.Diagnostics
- EventSenseTestsVixen.Ai.Perception.Tests
- FilterTestsVixen.Ai.Perception.Tests
- FleetVixen.Ai.Perception.Tests
- IBlackboardBindingVixen.Ai.Perception
- NearestPerceivedInputVixen.Ai.Perception
- NearestPerceivedSensorVixen.Ai.Perception
- NearestPerceivedServiceVixen.Ai.Perception
- PerceivedCountBindingVixen.Ai.Perception
- PerceivedCountInputVixen.Ai.Perception
- PerceivedCountSensorVixen.Ai.Perception
- PerceivedTargetDecoratorVixen.Ai.Perception
- PerceptionNodeTestsVixen.Ai.Perception.Tests
- PerceptionSnapshotsVixen.Ai.Perception
- PerceptionSystemVixen.Ai.Perception
- SightOcclusionTestsVixen.Ai.Perception.Tests
- SightTestsVixen.Ai.Perception.Tests
- TargetLocationAgeBindingVixen.Ai.Perception
- TeamRelayTestsVixen.Ai.Perception.Tests