Skip to main content

HandPositionInput

A class in Root.Township, the global namespace.

Skill input method made by a HandPositionStructure: turns active after the held item stays in position long enough, and off again after ActiveTime out of position.

Constructors​

MemberWhat it is
HandPositionInput()Creates a HandPositionInput with default values.

Fields​

4 private and internal fields
MemberWhat it is
private float activationCountdownTime left before an active input turns off while out of position.
private bool isActiveWhether the input is active.
private float runningTimeTime spent in position towards activation.
private HandPositionStructure structureThe structure asset that defines the position and timings.

Properties​

MemberWhat it is
HeldPickupHandler Handler { get; private set; }The held pickup handler this input watches.
3 private and internal properties
MemberWhat it is
private bool ISkillInputMethod.IsActive { get; }True while the input is active.
private bool ISkillInputMethod.NeedsUpdate { get; }Always true; the input is polled every frame.
private bool ISkillInputMethod.ReceivesHits { get; }Always false; hits are ignored.

Events​

MemberWhat it is
event Action<bool, ISkillInputMethod> ChangedActiveRaised when the input turns active or inactive.

Methods​

MemberWhat it is
void Reset(bool isCallingEvent)Zeros the timers and turns the input off, optionally raising ChangedActive.
4 private and internal methods
MemberWhat it is
private void ISkillInputMethod.Clear()Resets the input and raises ChangedActive if it was active.
private bool ISkillInputMethod.ReceiveHit(HeldPickupHandler handler, ImpactHitWithTool hitWithTool, ProfessionSkill skill)Ignores the hit and returns false.
private void ISkillInputMethod.RegisterHandler(HeldPickupHandler pickupHandler, SkillInputStructure structure, ProfessionSkill skill)Stores the pickup handler and the hand position structure to check against.
private void ISkillInputMethod.Update()Counts time in position until activation, then counts down the active time while out of position.