Impact
namespace Griff.Runtime;
public struct ImpactOne hard knock in the last physics step: Struck was hit by By at Point, as hard as Strength says. Strength is the push it took to stop the two coming together where they met (an impulse: mass times speed), so a crate of Mass 1 landing on the floor at 5 units a second hits 5, and a ball of Mass 2 thrown at a crate of Mass 1 at 9 units a second hits about 6, shared by their weights. Both sides of a knock are told, once a step for each pair, the harder of the points where they met; gentle touches (closing at under a unit a second: resting, sliding, settling) aren’t knocks.
Properties
Section titled “Properties”public Entity By { get; init; }public Vector2 Point { get; init; }Strength
Section titled “Strength”public float Strength { get; init; }Struck
Section titled “Struck”public Entity Struck { get; init; }Methods
Section titled “Methods”Deconstruct
Section titled “Deconstruct”public void Deconstruct(out Entity Struck, out Entity By, out float Strength, out Vector2 Point)Equals
Section titled “Equals”public override bool Equals(object obj)Equals
Section titled “Equals”public bool Equals(Impact other)GetHashCode
Section titled “GetHashCode”public override int GetHashCode()ToString
Section titled “ToString”public override string ToString()