A class in Root.Township, Alta.Woodcutting.
Asset describing how one piece of a choppable tree joins its parent: how it can be rotated, how many cut points it has and how much damage breaks it.
Constructors
| Member | What it is |
|---|
WoodcutConnectionType() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
6 private and internal fields
| Member | What it is |
|---|
private int bones | How many woodcut points a connection of this type spans for breaking (default 12). |
private float breakThreshold | Base damage a connection takes before it breaks, scaled by species and node multipliers. |
private WoodcutTreeModelEvent broken | Event raised with the piece when this connection breaks (called for the root when a tree falls). |
private bool isRoot | Marks the root connection type. Not read elsewhere in the code. |
private bool isStick | Whether pieces of this type use the species' stick distribution instead of the wedge one. |
private int rotations | Number of evenly spaced yaw rotations a child piece can be given (default 1). |
Properties
| Member | What it is |
|---|
int Bones { get; } | Number of cut points along the joint. Defaults to 12. |
float BreakThreshold { get; } | Damage needed to break the joint, before multipliers. |
WoodcutTreeModelEvent Broken { get; } | Event raised when a piece of this type breaks off. |
bool IsRoot { get; } | Whether this is the root joint of the tree. |
bool IsStick { get; } | Whether pieces of this type drop sticks rather than wedges. |
int Rotations { get; } | Number of evenly spaced rotations a child piece can be placed at. |
Methods
| Member | What it is |
|---|
void Break(WoodcutTreeModel piece) | Raises Broken with the piece that broke off. |
Used in
Members of other types that take, return or hold a WoodcutConnectionType: