ImpactorMap
A class in Root.Township, Alta.Impact.
Component on a crafting part that maps each of its colliders to the ImpactGenerators under it. Used by ImpactTool and ImpactModifier when parts are joined into a tool.
- Listed in Items, inventory and logic
- Inherits or implements
MonoBehaviour - Nested types
MapElement
Constructors
| Member | What it is |
|---|---|
ImpactorMap() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
| Member | What it is |
|---|---|
private ImpactorMap.MapElement[] elements | Serialized pairs of a collider and the impact generators under it. Filled automatically by OnValidate when empty. |
private Dictionary<Collider, HashSet<ImpactGenerator>> map | Backing field for Map, built from elements the first time it's read. |
Properties
| Member | What it is |
|---|---|
Dictionary<Collider, HashSet<ImpactGenerator>> Map { get; } | Collider to impact generator lookup, built from the serialized elements on first use. |
IEnumerable<ImpactGenerator> OrderedImpactors { get; } | Every impact generator in the map, in serialized order. Can repeat a generator listed under several colliders. |
Methods
Used in
Members of other types that take, return or hold a ImpactorMap: