NestingMenuAction
A class in Root.Township, Alta.QuickAccessActions.
Quick access action that opens a fan of sub-bubbles for its nested actions when selected. Client only.
- Listed in Players and characters
- Inherits or implements
QuickAccessMenuAction - Attributes
CreateAssetMenu
Constructors
| Member | What it is |
|---|---|
NestingMenuAction() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
7 private and internal fields
| Member | What it is |
|---|---|
private PooledObjectDefinition bubbleDefinition | Pool definition for the sub-bubbles. |
private QuickAccessMenuBubble currentBubble | The bubble this action is shown in while open. |
private bool isSelected | True while the sub-bubbles are out. |
private QuickAccessMenuAction[] nestedActions | The actions inside. |
private float overrideSelectedScale | Backing field for OverrideSelectedScale. |
private const float RadialSpaceInDegrees | Arc the sub-bubbles are spread over (180 degrees). |
private readonly List<QuickAccessMenuBubble> spawnedBubbles | Sub-bubbles currently out. |
Properties
Methods
| Member | What it is |
|---|---|
override void Close() | Collapses the sub-bubbles when the menu closes. |
override void InitializeForPlayer(Player player, bool isDev) | Also sets up every nested action for the player. |
override void MarkSelected(QuickAccessMenuBubble bubble) | On first selection, spawns the nested bubbles in a half circle around this bubble. |
override void Run(Controller controller) | Does nothing. |
3 private and internal methods
| Member | What it is |
|---|---|
private void CheckClose(QuickAccessMenuBubble markedBubble) | When another bubble is marked, collapses unless it is this bubble or one of its children. |
private void Collapse() | Releases the sub-bubbles and removes them from the controller. |
private void SpawnNestedBubbles(Vector3 origin, Vector3 offsetDirection, Quaternion step) | Spawns a pooled bubble for each non-ignored nested action along the arc. |