DiggingImpactorSettings
A class in Root.Township, the global namespace.
Settings for a digging tool's DiggingImpactor: which hits dig and how deep, how hard it is to pull out, and durability cost, all scaled by hit efficiency.
- Listed in Global namespace: C to D
- Inherits or implements
ScriptableObject - Attributes
CreateAssetMenu
Constructors
| Member | What it is |
|---|---|
DiggingImpactorSettings() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
11 private and internal fields
| Member | What it is |
|---|---|
private float baseDiggingDamage | Base dig damage. Defaults to 1. |
private ImpactChannel[] diggingChannels | Impact channels that count as digging. |
private AnimationCurve efficiencyToDepth | Curve from dig efficiency to how deep the tool goes. |
private AnimationCurve efficiencyToDurabilityDamage | Curve from dig efficiency to tool durability lost per dig. |
private AnimationCurve efficiencyToPull | Curve from dig efficiency to how far the tool must be pulled to come out. |
private AnimationCurve efficiencyToRadius | Curve from dig efficiency to dig radius. |
private AnimationCurve efficiencyToTorque | Curve from dig efficiency to how much twist digs the tool out. |
private float minEffectiveness | Lowest dig effectiveness at zero efficiency. Defaults to 0.2. |
private PositionEvent onDigEffect | Effect event fired at a position when digging. |
private PositionEvent onEmbbedEffect | Effect event fired at a position when the tool embeds. |
private LayerMask targetLayers | Layers the tool can dig into. |
Properties
| Member | What it is |
|---|---|
float BaseDiggingDamage { get; } | Base digging damage value. |
ImpactChannel[] DiggingChannels { get; } | Impact channels checked when the tool hits the ground. |
float MinEffectiveness { get; } | Hits below this effectiveness do not dig. Efficiency is measured from here up to 1. |
int TargetLayersValue { get; } | Layer mask of colliders that can be dug. Hits on rigidbodies are ignored. |
Methods
Used in
Members of other types that take, return or hold a DiggingImpactorSettings: