TextBoard
A class in Root.Township, the global namespace.
Pickup with a UI text that registers a Textboard console module while enabled, with commands to add text, clear it and change its colour. It goes kinematic when let go.
- Listed in Global namespace: T to X
- Inherits or implements
MonoBehaviour
Constructors
| Member | What it is |
|---|---|
TextBoard() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
| Member | What it is |
|---|---|
private static Module module | The registered console module; static, so only the latest board gets commands. |
private Text text | The UI text shown on the board. |
Methods
6 private and internal methods
| Member | What it is |
|---|---|
private void Add(string message) | Console command add: appends a line to the board. |
private void BecomeKinematic(Interactable interactable, Interactor interactor) | Makes the rigidbody kinematic when the player lets go. |
private void Clear() | Console command clear: empties the board. |
private void Color(float r, float g, float b, float a = 1) | Console command color: sets the text colour from r, g, b and optional a. |
private void OnDisable() | Removes the console module and the release listener. |
private void OnEnable() | Registers the console module (replacing any older one) and listens for the pickup being released. |