TimberPieceGroup
A class in Root.Township, Alta.Carpentry.
A timber piece made of several TimberPiece parts that are chiselled together as one. Damage goes to every part, and it counts as done when all parts are done.
- Listed in Crafting and making
- Inherits or implements
TimberPieceBase - Documented in Farming, woodcutting and carpentry
Constructors
| Member | What it is |
|---|---|
TimberPieceGroup() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
| Member | What it is |
|---|---|
private bool isOnServer | Unused. |
private TimberPiece[] pieces | The parts that make up this group. |
Properties
Methods
| Member | What it is |
|---|---|
override void Load(PieceSaveData data) | Restores each part from saved sub-data, if the group was modified. |
override void ReceiveDamage(float damage, Vector3 position, Vector3 direction, ChiselingTool tool, Collider hitCollider) | Passes the hit to every part, raises OnChanged, and marks the group done (recording the hitting player) once all parts are done. |
override void Rotate(bool isInversedUp) | Does nothing for a group. |
override PieceSaveData Save() | Saves the modified flag and, if modified, each part's data as sub-data. |
override void Serialize(Stream stream, bool isWritingFull) | Network sync: writes the modified flag, then each part's state if modified. |