ToCombatTransition<TFrom>
A class in Root.Township, Alta.PlayerStates.Transitions.
Transition into the combat state. Fires when the player is hurt by a tool within combat range, or when the player causes combat.
Constructors
Properties
1 private and internal property
Methods
| Member | What it is |
|---|
protected override void AddListeners() | Hooks the player's health changes and caused-combat events. |
protected override void RemoveListeners() | Unhooks the health and caused-combat events. |
2 private and internal methods
| Member | What it is |
|---|
private void CheckEnterCombat(HealthObject healthObject, float healthChange, DamageData impact) | On tool damage while still alive, enters combat if the attacker is in range, resets the combat timer and tells the attacker it caused combat. Ignores self-hits. |
private void HandleCausedCombat(PlayerController attacker, NetworkEntity attackee, float distanceBetweenCombatantsSquared, float damage) | Enters combat when this player attacks someone, resetting the combat timer by distance. |