Skip to main content

TargetBasedSkill.ClientHitInput

A protected class in Root.Township, the global namespace. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

A tool hit as the client saw it (position, direction, damage, impact type), serialized so a TargetBasedSkill can report it to the server.

Constructors​

MemberWhat it is
ClientHitInput()Creates a TargetBasedSkill.ClientHitInput with default values.

Fields​

6 private and internal fields
MemberWhat it is
private Chunk chunkChunk the position is relative to when serialized.
private float damageBacking field for Damage.
private Vector3 directionBacking field for Direction.
private int impactTypeIndexBacking field for ImpactType, as an int.
private Vector3 positionBacking field for Position.
private Vector3 upBacking field for Up.

Properties​

MemberWhat it is
float Damage { get; }Hit damage: the hit's base health damage times its effectiveness.
Vector3 Direction { get; }Direction of the hit.
ImpactType ImpactType { get; }The hit's impact type.
Vector3 Position { get; }Hit position.
Vector3 Up { get; }Up direction for the hit.

Methods​

MemberWhat it is
void Serialize(Stream stream)Reads or writes the chunk and position, both directions, damage (0 to 63) and impact type.
void Setup(Vector3 position, Vector3 direction, Vector3 up, ImpactHitWithTool hit)Fills in the values from a tool hit, using the chunk the local player is in.

Used in​

Members of other types that take, return or hold a ClientHitInput: