A class in Root.Township, the global namespace.
Visual for a pulley Belt in a parent object. The base version only draws the belt path with debug lines when the belt rotates; subclasses draw the real thing.
Constructors
| Member | What it is |
|---|
BeltVisual() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
| Member | What it is |
|---|
private float maximumSegmentLength | Longest straight segment between points. |
private float segmentsPerDegree | How many points to use per degree of wrap around a pulley. |
Properties
| Member | What it is |
|---|
Belt Belt { get; private set; } | The Belt found in the parents. |
Methods
| Member | What it is |
|---|
virtual void DrawConnections() | Draws the belt's rope path with Debug.DrawLine (closing segment in blue). Virtual. |
protected virtual void Awake() | Finds the parent belt and redraws whenever it rotates. |
protected void GetBelt() | Finds the Belt in the parents. |
protected IEnumerable<Vector3> GetPoints() | Points along the belt wrapped around its connected turnables, from PulleyBeltHelper.GetRope. |