A class in Root.Township, the global namespace.
The input-to-action mappings for one platform within a controller action mode: which buttons trigger which ControllerActionType on each hand.
Constructors
Fields
4 private and internal fields
| Member | What it is |
|---|
private List<InputToActionMapping> inputToActionMappings | Backing list for AllInputToActionMappings, set in the inspector. |
private Dictionary<ControllerActionType, List<object[]>> leftActionToInputMappings | Backing field for LeftActionToInputMappings. |
private PlayerMode platform | Backing field for Platform, the player mode these mappings are for. |
private Dictionary<ControllerActionType, List<object[]>> rightActionToInputMappings | Backing field for RightActionToInputMappings. |
Properties
| Member | What it is |
|---|
List<InputToActionMapping> AllInputToActionMappings { get; } | Every input to action mapping in this set. |
PlatformActionMapping AllPlatformsMapping { get; set; } | A shared mapping whose buttons are added to this one's results. |
int MappingsCount { get; } | Number of mappings. |
string ModeName { get; private set; } | Name of the controller mode this belongs to, set by SetupParent. |
PlayerMode Platform { get; set; } | The player mode (platform) these mappings are for. |
ControllerModeType Type { get; private set; } | The controller mode type this belongs to, set by SetupParent. |
2 private and internal properties
| Member | What it is |
|---|
private Dictionary<ControllerActionType, List<object[]>> LeftActionToInputMappings { get; } | Left hand lookup from action to button sets, built on first use. |
private Dictionary<ControllerActionType, List<object[]>> RightActionToInputMappings { get; } | Right hand lookup from action to button sets, built on first use. |
Methods
| Member | What it is |
|---|
void AddNewEmptyInputMapping() | Adds a blank mapping, probably for the editor. |
List<object[]> GetButtons(ControllerActionType actionType, HandIndex handIndex) | The button sets bound to an action on one hand, including those from AllPlatformsMapping. |
void RemoveByIdentifier(int id) | Removes the mapping with the given identifier. |
void SetupParent(ControllerActionMode parent) | Copies the type and name from the owning controller action mode. |
3 private and internal methods
| Member | What it is |
|---|
private void AddMapping(InputToActionMapping mapping, PlayerMode overridePlatform = 0) | Adds a mapping to the list and files its buttons for the platform under the left, right or both hand lookups. |
private void AddToButtonsArray(Dictionary<ControllerActionType, List<object[]>> dictionary, ControllerActionType actionType, object[] newButtons) | Adds a button set to an action's list in a hand lookup, making the list if needed. |
private void InitializeDictionaries() | Builds the left and right hand lookups from every input mapping. |
Used in
Members of other types that take, return or hold a PlatformActionMapping:
ControllerAction.AddInputAndListeners, ControllerAction.RemoveInputsAndListeners, ControllerAction.SetInputAndListeners, ControllerActionMode.allPlatformsActionMapping, ControllerActionMode.AllPlatformsActionMapping, ControllerActionMode.GetMapping, ControllerActionMode.platformActionMappings, ControllerActionMode.PlatformActionMappings, ControllerActionMode.platformActionMappingsList, ControllerActions.activeActionMappings, ControllerActions.ActiveActionMappings, ControllerActions.AddActionMapping, ControllerActions.RemoveActionMapping, ControllerActions.SetActionMapping, InputSourcePair.parentMapping.