Skip to main content

ShapeImpactCollector

An abstract class in Root.Township, the global namespace.

Asset describing a shape (sphere or cylinder) that collects the colliders an area attack hits. AreaAttackSkill picks one per skill level.

Constructors​

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

Properties​

MemberWhat it is
abstract float SizeSquared { get; }Squared radius of the shape; AreaAttackSkill divides squared distances by it to scale damage falloff.

Methods​

MemberWhat it is
abstract IEnumerable<Collider> CollectColliders(ImpactHitWithTool hit, LayerMask collectionLayer)Returns the colliders on the given layers inside the shape at a tool hit.
virtual void DrawGizmos()Draws the shape in the editor; does nothing by default.

Used in​

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