A class in Root.Township, the global namespace.
Asset that maps D-pad directions to hand gestures, plus the idle gesture. Used by HandGestureController.
Constructors
| Member | What it is |
|---|
GestureMap() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private Dictionary<int, HandGestureDefinition> gestureMap | Cached lookup behind Map. |
private GestureMap.GestureMapping[] gestureMappings | Serialized direction and gesture pairs. Directions must not exceed the D-pad's button count. |
private HandGestureDefinition idleGesture | Backing field for IdleGesture. |
private bool isGradualGrip | Backing field for IsGradualGrip. |
Properties
| Member | What it is |
|---|
HandGestureDefinition IdleGesture { get; } | The gesture used when no direction is chosen. |
bool IsGradualGrip { get; } | When true, the hand animator's grab value follows the grip axis on clients. |
Dictionary<int, HandGestureDefinition> Map { get; } | D-pad direction to gesture lookup, built on first use. |
Methods
| Member | What it is |
|---|
void SetupDictionary() | Builds the direction to gesture lookup from the serialized mappings. Throws on duplicate directions. |
Used in
Members of other types that take, return or hold a GestureMap: