HitInfo
namespace Griff.Modules.Fighting;
public struct HitInfoA hit one Hitboxes landed on another (or on something with a Health on its Layers).
Properties
Section titled “Properties”Attacker
Section titled “Attacker”public Entity Attacker { get; init; }What hit: the entity whose hitbox landed.
Damage
Section titled “Damage”public float Damage { get; init; }The damage dealt: the hitbox’s times the hurtbox’s multiplier.
public int Group { get; init; }The hitbox’s group.
Knockback
Section titled “Knockback”public Vector2 Knockback { get; init; }How fast it sent the target flying, in the world (turned the way the attacker faces).
public Vector2 Point { get; init; }Where it landed: the middle of where the two boxes overlap.
public int Stun { get; init; }The steps of hitstun it left the target in.
Target
Section titled “Target”public Entity Target { get; init; }What was hit: the entity whose hurtbox (or collider) it landed on.
Methods
Section titled “Methods”Deconstruct
Section titled “Deconstruct”public void Deconstruct(out Entity Attacker, out Entity Target, out float Damage, out Vector2 Knockback, out int Stun, out int Group, out Vector2 Point)Equals
Section titled “Equals”public override bool Equals(object obj)Equals
Section titled “Equals”public bool Equals(HitInfo other)GetHashCode
Section titled “GetHashCode”public override int GetHashCode()ToString
Section titled “ToString”public override string ToString()