Skip to main content

EquipmentTransition<TFrom, TTo>

An abstract class in Root.Township, Alta.PlayerStates.Transitions.

Base for transitions into and out of the equipment state. They fire when something calls the subclass's static Trigger, not from a player event.

Constructors​

MemberWhat it is
EquipmentTransition(PlayerStateType destinationType)Creates an EquipmentTransition from destinationType.

Fields​

MemberWhat it is
protected static Action triggerStatic callback that Trigger calls. Shared by every instance of the same closed type, so only the last one turned on gets it.

Properties​

1 private and internal property
MemberWhat it is
private EquipmentStateSettings EquipmentSettings { get; }The EquipmentStateSettings asset. Not read in this class.

Methods​

MemberWhat it is
protected override void AddListeners()Points the static trigger at this transition. Logs an error instead if the player is missing.
protected override void RemoveListeners()Clears the static trigger.
1 private and internal method
MemberWhat it is
private void Triggered()Runs the transition to the destination state.