Skip to main content

WoodcutConnectionType

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​

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

Fields​

6 private and internal fields
MemberWhat it is
private int bonesHow many woodcut points a connection of this type spans for breaking (default 12).
private float breakThresholdBase damage a connection takes before it breaks, scaled by species and node multipliers.
private WoodcutTreeModelEvent brokenEvent raised with the piece when this connection breaks (called for the root when a tree falls).
private bool isRootMarks the root connection type. Not read elsewhere in the code.
private bool isStickWhether pieces of this type use the species' stick distribution instead of the wedge one.
private int rotationsNumber of evenly spaced yaw rotations a child piece can be given (default 1).

Properties​

MemberWhat 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​

MemberWhat 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: