Skip to main content

StrikeSuccessionInput

A class in Root.Township, the global namespace.

Skill input that counts a run of good tool hits on a matching channel; reaching the target count activates the skill (a power strike) for a short time, and the next hit uses it. Made by StrikeSuccessionInputStructure.

Constructors​

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

Fields​

8 private and internal fields
MemberWhat it is
private AltaCoroutine coroutineThe running timer coroutine.
private int currentCountHits counted so far in this run.
private bool isActiveWhether the power strike is ready.
private bool isCalledThisFrameStops more than one hit counting in the same frame.
private float lastActiveTimeReal time the skill was last used, for the cool down.
private PickupBasedSkill skillThe skill to execute on the finishing hit.
private StrikeSuccessionInputStructure structureSettings asset with the timings, channel and counts.
private int targetCountHits needed to activate, from the player's skill level.

Properties​

MemberWhat it is
HeldPickupHandler Handler { get; private set; }The held pickup handler this input belongs to.
3 private and internal properties
MemberWhat it is
private bool ISkillInputMethod.IsActive { get; }True while the power strike is ready.
private bool ISkillInputMethod.NeedsUpdate { get; }False: the input is driven by hits, not per-frame updates.
private bool ISkillInputMethod.ReceivesHits { get; }True: this input listens for hits.

Events​

MemberWhat it is
event Action<bool, ISkillInputMethod> ChangedActiveRaised when the power strike becomes ready or runs out.
static event SuccessionStrikeDelegate StrikeCountUpdateStatic event raised with the player, skill and new count every time the count changes.

Methods​

MemberWhat it is
bool IncreaseCount()Adds one to the count without a hit (used by BlockingCharge); returns true when it reaches the target and activates.
void Reset(bool isCallingEvent)Sets the count to zero, deactivates and stops the timer.
6 private and internal methods
MemberWhat it is
private void ISkillInputMethod.Clear()Resets the count and deactivates.
private bool ISkillInputMethod.ReceiveHit(HeldPickupHandler handler, ImpactHitWithTool hitWithTool, ProfessionSkill skill)Counts a hit if effective enough and on the target channel, starts timers, activates at the target count and runs the skill on the hit after that.
private void ISkillInputMethod.RegisterHandler(HeldPickupHandler pickupHandler, SkillInputStructure structure, ProfessionSkill skill)Stores the handler, skill and structure, and works out the strike count for the player's level.
private IEnumerator RunTime(float time, Pickup pickup) (iterator)Coroutine that waits the combo or power strike window, then deactivates and resets the count.
private void StopCoroutine()Stops the running timer coroutine.
private void ISkillInputMethod.Update()Does nothing.