Skip to main content

DynamiteStrike

A class in Root.Township, the global namespace.

Area attack skill that fires when an active tool collides with something on the target layers, using the best contact hit.

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private bool acceptRigidbodiesWhether hitting a rigidbody can trigger it.
private LayerMask targetLayerLayers a collision must hit to count.
private Dictionary<Pickup, ISkillInputMethod> toolInputsSkill input for each registered pickup.

Methods​

MemberWhat it is
override void Deregister(ISkillInputMethod input)Unhooks the tool's collision event and forgets the input.
override void Register(ISkillInputMethod input)Remembers the input under its pickup.
override void SetEffectActive(Pickup pickup, Player player, bool isEffectActive)Hooks the tool's collision event while the effect is active and unhooks it otherwise.
override bool ValidateExecutionHit(ProgressionPath path, ImpactHitWithTool hitWithTool)Always false, so normal hits never trigger this skill.
1 private and internal method
MemberWhat it is
private void Collided(Collision collision, bool isHitting, ImpactTool tool)On a collision with an active input, finds the most effective contact hit, runs the attack if it meets the minimum, then resets the input next frame.