Skip to main content

ImpactModifierComponent

An abstract class in Root.Township, Alta.Impact.

Base for a ScriptableObject that changes a tool hit, such as applying a stat change, with a default effect and sound.

Constructors​

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

Fields​

2 private and internal fields
MemberWhat it is
private PooledObjectDefinition defaultEffectBacking field for Effect, the pooled effect for hits this modifier applies to.
private SoundEffectSet defaultSoundBacking field for SoundEffect, the sound set for hits this modifier applies to.

Properties​

MemberWhat it is
PooledObjectDefinition Effect { get; }The pooled effect spawned on the hit item when this modifier applies.
float ImpactModifierValueMultiplier { get; set; }Scales the modifier's strength. ImpactTool sets it per hit from the item's physical material and impactor parameters.
SoundEffectSet SoundEffect { get; }The default sound set for this modifier.

Methods​

MemberWhat it is
abstract void ModifyHit(ImpactHitWithTool hitWithTool)Applies the modifier to a tool hit.

Used in​

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