Skip to main content

SkillInputStructure

An abstract class in Root.Township, the global namespace.

Asset describing how a tool-based skill is triggered (the input gesture), with default effects for charging, using and cancelling.

Constructors​

MemberWhat it is
protected SkillInputStructure()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

3 private and internal fields
MemberWhat it is
private TransformEvent canceledDefaultEffectEffect played by PlaySoundAt when the skill is cancelled.
private TransformEvent chargedDefaultEffectEffect played by PlaySoundAt when the skill is charged.
private TransformEvent executedDefaultEffectEffect played by PlaySoundAt when the skill is used (consumed).

Methods​

MemberWhat it is
abstract ISkillInputMethod GetNewInput()Creates a fresh input tracker for one use of the skill.
void PlaySoundAt(Transform target, ToolBasedSkillStatus status)Plays the default charged, used or cancelled effect at a transform. Nothing for charging started.
virtual bool ValidatePickup(HeldPickupHandler handler)Whether the held item allows this input. True by default.

Used in​

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