Skip to content

HitInfo

namespace Griff.Modules.Fighting;
public struct HitInfo

A hit one Hitboxes landed on another (or on something with a Health on its Layers).

public Entity Attacker { get; init; }

What hit: the entity whose hitbox landed.

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.

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.

public Entity Target { get; init; }

What was hit: the entity whose hurtbox (or collider) it landed on.

public void Deconstruct(out Entity Attacker, out Entity Target, out float Damage, out Vector2 Knockback, out int Stun, out int Group, out Vector2 Point)
public override bool Equals(object obj)
public bool Equals(HitInfo other)
public override int GetHashCode()
public override string ToString()