A class in Root.Township, Alta.Woodcutting.
Marks a joint between two pieces of a choppable tree model: which connection type it is and which woodcut points break it. Sits on a networked tree piece.
Constructors
| Member | What it is |
|---|
WoodcutConnection() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
| Member | What it is |
|---|
WoodcutTreeModel model | Serialized backing field for Model. Public, but use Model. |
5 private and internal fields
| Member | What it is |
|---|
private float breakThresholdMultiplier | Backing field for BreakThresholdMultiplier. |
private WoodcutConnectionType connectionType | Backing field for ConnectionType; its bone count sets how many break points the connection has. |
private NetworkEntity entity | Cached NetworkEntity on the same GameObject, filled the first time Entity is read. |
private int pointIndex | Index of the first woodcut point in the model that belongs to this connection; BreakPoints starts here. |
private int rotations | Backing field for Rotations. |
Properties
| Member | What it is |
|---|
IEnumerable<WoodcutPointData> BreakPoints { get; } | The woodcut points of the model that belong to this connection, as many as the connection type has bones. |
float BreakThresholdMultiplier { get; } | Scales how much cutting it takes to break this connection. |
WoodcutConnectionType ConnectionType { get; } | The connection type, which sets how many bones (break points) it has. |
NetworkEntity Entity { get; } | The network entity on the same object. |
WoodcutTreeModel Model { get; } | The tree model this connection belongs to. |
int Rotations { get; } | Rotation count for the connection, set in the prefab. |
Used in
Members of other types that take, return or hold a WoodcutConnection: