NameLookup
namespace Griff.Scenes;
public struct NameLookupHow Find narrows a name down.
Properties
Section titled “Properties”ActiveOnly
Section titled “ActiveOnly”public bool ActiveOnly { get; init; }Only entities that are on (see IsActive).
Around
Section titled “Around”public Vector2? Around { get; init; }Where nearest is measured from; without it, From’s centre.
Centre
Section titled “Centre”public Func<Entity, Vector2>? Centre { get; init; }The component that wants the nearest says so, giving where an entity is: of the ones with the name, the nearest to Around wins (and a network game’s own player does not).
ExceptFrom
Section titled “ExceptFrom”public bool ExceptFrom { get; init; }Never From itself (a weld to the nearest other part).
public Entity? From { get; init; }The entity that holds the name (a field’s owner, a camera following one): what is inside it is meant first, and the part of the scene it is in.
public NameScope Scope { get; init; }Where to look: inside From first and then the scene (the rule), only the scene, or only inside From.
public Func<Entity, bool>? Where { get; init; }Only entities this accepts (one with a component, not the holder itself).
Methods
Section titled “Methods”Deconstruct
Section titled “Deconstruct”public void Deconstruct(out Entity? From, out bool ActiveOnly, out NameScope Scope, out bool ExceptFrom, out Func<Entity, bool>? Where, out Func<Entity, Vector2>? Centre, out Vector2? Around)Equals
Section titled “Equals”public override bool Equals(object obj)Equals
Section titled “Equals”public bool Equals(NameLookup other)GetHashCode
Section titled “GetHashCode”public override int GetHashCode()ToString
Section titled “ToString”public override string ToString()