EntityPairSet
namespace Griff.Runtime;
public sealed class EntityPairSetPairs of entities, each pair once, in the order they were first added: who touched what in a frame’s physics (see Touches) and which triggers have what in them (TriggerPairs). Whatever goes by them (which of two collectors gets a pickup, which trigger hears of something first) goes the same way every time, after a rewind too, rather than in a hash set’s order.
Properties
Section titled “Properties”public int Count { get; }How many pairs there are.
Methods
Section titled “Methods”public bool Add(ValueTuple<Entity, Entity> pair)Adds a pair, after the others; false if it’s there already.
public void Clear()Forgets every pair.
Contains
Section titled “Contains”public bool Contains(ValueTuple<Entity, Entity> pair)True if pair touched.
EnsureCapacity
Section titled “EnsureCapacity”public void EnsureCapacity(int capacity)Makes room for capacity pairs, so adding them makes no garbage.
GetEnumerator
Section titled “GetEnumerator”public List<T>.Enumerator GetEnumerator()The pairs, in the order they were added.