DirectionAttribute
namespace Griff.Scenes;
public sealed class DirectionAttribute : FieldEditorAttributeMarks a Vector2 as a direction, e.g. which way a shooter fires or a bouncer launches: (0, 1) is up and (1, 0) right. The Inspector adds a compass of the eight ways to pick from, and with Distance Handles (D) the Scene view draws it as an arrow from the entity with a knob to drag round.
Properties
Section titled “Properties”FitsText
Section titled “FitsText”public override string FitsText { get; }public string? None { get; init; }What (0, 0) means, for a direction that may be none, e.g. “straight away from its middle”: the compass offers it.
Turned
Section titled “Turned”public bool Turned { get; init; }It’s in the entity’s own space, turned with it (a plunger’s, a bumper’s), rather than the world’s: the Scene view draws it turned, and a drag sets it back in the entity’s own.
Methods
Section titled “Methods”Describe
Section titled “Describe”public override string Describe()public override bool Fits(Type type)