Skip to main content

BowDrawSkill

A class in Root.Township, Alta.Progression.Skills.

Bow skill that boosts the damage of the next arrow shot from a bow while the skill is active, scaled by the player's skill level.

Constructors​

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

Fields​

MemberWhat it is
protected FloatValuesPerLevel damageMultiplierPerLevelDamage multiplier for each skill level.
2 private and internal fields
MemberWhat it is
private Dictionary<ISkillInputMethod, BowString> bowStringsBow string for each registered skill input.
private Dictionary<BowString, ISkillInputMethod> inputsSkill input for each bow string, the reverse of bowStrings.

Methods​

MemberWhat it is
override void Deregister(ISkillInputMethod input)Stops tracking the input's bow string, one frame later.
override void InputChangedState(bool isEnabled, ISkillInputMethod input)Listens for the bow string shooting while the input is enabled. A shot applies the multiplier to the arrow, uses the skill and resets the input.
override void Register(ISkillInputMethod input)Starts tracking the bow string of the held bow for this input.
protected float GetDamageMultiplier(Player player)The damage multiplier for the player's level in this skill.
protected override Transform GetTransformToCallAt(ToolBasedSkillStatus status, NetworkEntity entity)Where to show skill effects: the arrow's tip if it has one, otherwise the entity itself.
protected virtual void HandleInputChanged(bool isEnabled, ISkillInputMethod input, BowString bowString)Turns the skill effect on or off for the arrow docked on the bow string, if there is one.
1 private and internal method
MemberWhat it is
private void OnArrowShot(BowString bowString, NetworkEntity shotEntity, Vector3 shotVelocity)Called when a registered bow string shoots: sets the shot's one-off damage multiplier for the player's level, sends consumed and resets the input.