public void OnInputAction(InputAction action, InputDevice player) { switch (action) { case InputAction.Up: case InputAction.Down: case InputAction.Left: case InputAction.Right: selectedTrack.Value = trackGrid.GetFrom(selectedTrack.Value, GridCollectionUtils.DirectionFromMenuAction(action)); break; } }
public void OnInputAction(InputAction action, InputDevice input) { var assignedPlayer = GetSelectionForDevice(input); if (assignedPlayer == null) { return; } switch (action) { case InputAction.Up: case InputAction.Down: case InputAction.Left: case InputAction.Right: if (!assignedPlayer.confirmed.Value) { assignedPlayer.character.Value = characterGrid.GetFrom(assignedPlayer.character.Value, GridCollectionUtils.DirectionFromMenuAction(action)); } break; } }