BoulderDefinition
A class in Root.Township, Alta.Impact.
An asset describing a mineable rock: its health, what it drops, how its hits look, and its ore material. Used by Rock.
- Listed in Items, inventory and logic
- Inherits or implements
HashedGeneralValue<BoulderDefinition> - Derived types
BoulderDefinition,BoulderDefinition.Create - Nested types
Create
Constructors
| Member | What it is |
|---|---|
BoulderDefinition() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
6 private and internal fields
| Member | What it is |
|---|---|
private PooledObjectDefinition destroyedEffect | Pooled effect a Rock plays (client only) when it breaks. |
private AnimationCurve dropCount | Curve from a random 0 to 1 roll to how many resources drop. Defaults to 0 to 4. |
private int health | Hit points of the boulder (0 to 1024). |
private ImpactDetectorSettings impactSettings | Impact detector settings for the boulder. |
private Material oreMaterial | Material put on the rock's ore renderers. |
private ResourceDropChance[] resourcesDropChances | The resources the boulder can drop, with their chances. |
Properties
| Member | What it is |
|---|---|
PooledObjectDefinition DestroyedEffect { get; } | Pooled effect spawned when the rock is destroyed. Not on headless servers. |
AnimationCurve DropCount { get; } | Curve sampled at a random value to get how many resources drop. |
int Health { get; } | How much damage the rock takes before breaking. |
ImpactDetectorSettings ImpactSettings { get; } | Impact effects and sounds for hits on the rock. |
Material OreMaterial { get; } | Material put on the rock's ore renderers. |
ResourceDropChance[] ResourcesDropChances { get; } | Which resources can drop and how likely each is. |
Used in
Members of other types that take, return or hold a BoulderDefinition: