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.
- Listed in Players and characters
- Inherits or implements
SpecificPickupBasedSkill - Derived types
BowQuickdraw,BowSlowdraw,LightBeamSkill
Constructors
| Member | What it is |
|---|---|
BowDrawSkill() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
| Member | What it is |
|---|---|
protected FloatValuesPerLevel damageMultiplierPerLevel | Damage multiplier for each skill level. |
2 private and internal fields
| Member | What it is |
|---|---|
private Dictionary<ISkillInputMethod, BowString> bowStrings | Bow string for each registered skill input. |
private Dictionary<BowString, ISkillInputMethod> inputs | Skill input for each bow string, the reverse of bowStrings. |
Methods
| Member | What 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
| Member | What 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. |