WoodcutTree.MapNode
A class in Root.Township, Alta.Woodcutting.
One segment in a WoodcutTree's layout: its model, the connection it hangs from, its children and attachments. Mass and size changes add up into the parent nodes.
- Listed in Crafting and making
- Nested in
WoodcutTree - Derived types
WoodcutTreeNodeBaker
Constructors
| Member | What it is |
|---|---|
MapNode() | Creates a WoodcutTree.MapNode with default values. |
Fields
2 private and internal fields
Properties
| Member | What it is |
|---|---|
List<TreeAttachment> Attachments { get; } | Attachments on this segment. |
Dictionary<WoodcutConnection, WoodcutTree.MapNode> Children { get; } | Child nodes by the connection they hang from. |
bool HasFirstRenderer { get; private set; } | False if the first LOD renderer was skipped because the model's colour is off. |
float Mass { get; set; } | Mass of this segment and everything above it. Changes propagate to the parent. |
WoodcutTreeModel Model { get; set; } | The segment's model. |
WoodcutConnection Parent { get; set; } | Connection this segment hangs from. Null for the root. |
MeshRenderer[] Renderers { get; private set; } | LOD renderers made by GenerateRenderers. |
int Rotation { get; set; } | Rotation step on the parent connection. |
int TotalSize { get; set; } | Segment count of this node and everything above it. Changes propagate to the parent. |
WoodcutTree Tree { get; set; } | The tree this node belongs to. |
Methods
| Member | What it is |
|---|---|
void AddAttachment(TreeAttachment attachment) | Attaches a TreeAttachment (such as a branch item) to this segment and saves it as a child. |
void GenerateRenderers() | Creates hidden LOD mesh renderers for the segment, once. |
void RemoveAttachment(TreeAttachment attachment) | Detaches an attachment from this segment. |
void SpawnAttachment(PresetTree.Step.Attachment stepAttachment) | Spawns a preset attachment and attaches it at its saved position, rotation and scale. |
Used in
Members of other types that take, return or hold a MapNode:
TreeAttachment.AttachedTo, WoodcutTree.Add, WoodcutTree.BreakAttachments, WoodcutTree.MoveTo, WoodcutTree.Root, WoodcutTree.Sync, WoodcutTree.SyncAttachment, WoodcutTreeBaker.damaged, WoodcutTreeBaker.Initialize, WoodcutTreeBaker.nodes, WoodcutTreeBakingHandler.Bake, WoodcutTreeDamagedNodeBaker.GetLodCount, WoodcutTreeDamagedNodeBaker.GetMaterial, WoodcutTreeDamagedNodeBaker.IsValid, WoodcutTreeModel.MapNode, WoodcutTreeNodeBaker.GetLodCount, WoodcutTreeNodeBaker.GetMaterial, WoodcutTreeNodeBaker.GetMesh, WoodcutTreeNodeBaker.GetName, WoodcutTreeNodeBaker.GetTransform, WoodcutTreeNodeBaker.IsValid, WoodcutTreeNodeBakerLod0Only.GetLodCount.