A class in Root.Township, Alta.ScreenshotCamera.
Group of hand camera touch buttons that expand out and fold back in when toggled.
Constructors
| Member | What it is |
|---|
ButtonGroup() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
7 private and internal fields
| Member | What it is |
|---|
private float animationDuration | Seconds the expand or fold takes. |
private float animationProgress | 0 folded, 1 fully out. |
private HandCamera baseCamera | The hand camera the group belongs to. |
private Object[] buttons | The touch buttons (ITouchScreenButton). |
private bool isActive | True when expanded or expanding. |
private bool isAnimating | True while animating. |
private Vector3[] positions | Each button's expanded local position. |
Methods
| Member | What it is |
|---|
void Toggle() | Expands or folds the buttons, unless already animating. |
3 private and internal methods
| Member | What it is |
|---|
private void Awake() | Hooks the camera's owner change. |
private IEnumerator ExpandAnimation() (iterator) | Coroutine that moves and scales the buttons out or in, enabling them once fully out and hiding them once in. |
private void OwnerUpdate(bool isowned) | When the camera becomes owned, records the buttons' positions and folds them away hidden. |