Skip to content

NameLookup

namespace Griff.Scenes;
public struct NameLookup

How Find narrows a name down.

public bool ActiveOnly { get; init; }

Only entities that are on (see IsActive).

public Vector2? Around { get; init; }

Where nearest is measured from; without it, From’s 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).

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).

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)
public override bool Equals(object obj)
public bool Equals(NameLookup other)
public override int GetHashCode()
public override string ToString()