feat: changed input to radial for controller axis

This commit is contained in:
Jakob Feldmann 2024-06-12 13:34:13 +02:00
parent aff9e88a93
commit 641dfe5078
2 changed files with 50 additions and 0 deletions

View File

@ -45,6 +45,15 @@ public partial class @InputActionMaps: IInputActionCollection2, IDisposable
""interactions"": """",
""initialStateCheck"": true
},
{
""name"": ""Radial"",
""type"": ""Value"",
""id"": ""c3561fdc-5277-4bd1-9bd1-d0192276393d"",
""expectedControlType"": ""Vector2"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": true
},
{
""name"": ""Boost"",
""type"": ""PassThrough"",
@ -449,6 +458,17 @@ public partial class @InputActionMaps: IInputActionCollection2, IDisposable
""action"": ""Shoot"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""a111113b-812b-4220-85fd-5bf80a61f1b1"",
""path"": ""<Gamepad>/leftStick"",
""interactions"": """",
""processors"": """",
""groups"": ""Controller"",
""action"": ""Radial"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
},
@ -599,6 +619,7 @@ public partial class @InputActionMaps: IInputActionCollection2, IDisposable
m_Player = asset.FindActionMap("Player", throwIfNotFound: true);
m_Player_Thrust = m_Player.FindAction("Thrust", throwIfNotFound: true);
m_Player_Steer = m_Player.FindAction("Steer", throwIfNotFound: true);
m_Player_Radial = m_Player.FindAction("Radial", throwIfNotFound: true);
m_Player_Boost = m_Player.FindAction("Boost", throwIfNotFound: true);
m_Player_Shoot = m_Player.FindAction("Shoot", throwIfNotFound: true);
// Meta
@ -669,6 +690,7 @@ public partial class @InputActionMaps: IInputActionCollection2, IDisposable
private List<IPlayerActions> m_PlayerActionsCallbackInterfaces = new List<IPlayerActions>();
private readonly InputAction m_Player_Thrust;
private readonly InputAction m_Player_Steer;
private readonly InputAction m_Player_Radial;
private readonly InputAction m_Player_Boost;
private readonly InputAction m_Player_Shoot;
public struct PlayerActions
@ -677,6 +699,7 @@ public partial class @InputActionMaps: IInputActionCollection2, IDisposable
public PlayerActions(@InputActionMaps wrapper) { m_Wrapper = wrapper; }
public InputAction @Thrust => m_Wrapper.m_Player_Thrust;
public InputAction @Steer => m_Wrapper.m_Player_Steer;
public InputAction @Radial => m_Wrapper.m_Player_Radial;
public InputAction @Boost => m_Wrapper.m_Player_Boost;
public InputAction @Shoot => m_Wrapper.m_Player_Shoot;
public InputActionMap Get() { return m_Wrapper.m_Player; }
@ -694,6 +717,9 @@ public partial class @InputActionMaps: IInputActionCollection2, IDisposable
@Steer.started += instance.OnSteer;
@Steer.performed += instance.OnSteer;
@Steer.canceled += instance.OnSteer;
@Radial.started += instance.OnRadial;
@Radial.performed += instance.OnRadial;
@Radial.canceled += instance.OnRadial;
@Boost.started += instance.OnBoost;
@Boost.performed += instance.OnBoost;
@Boost.canceled += instance.OnBoost;
@ -710,6 +736,9 @@ public partial class @InputActionMaps: IInputActionCollection2, IDisposable
@Steer.started -= instance.OnSteer;
@Steer.performed -= instance.OnSteer;
@Steer.canceled -= instance.OnSteer;
@Radial.started -= instance.OnRadial;
@Radial.performed -= instance.OnRadial;
@Radial.canceled -= instance.OnRadial;
@Boost.started -= instance.OnBoost;
@Boost.performed -= instance.OnBoost;
@Boost.canceled -= instance.OnBoost;
@ -835,6 +864,7 @@ public partial class @InputActionMaps: IInputActionCollection2, IDisposable
{
void OnThrust(InputAction.CallbackContext context);
void OnSteer(InputAction.CallbackContext context);
void OnRadial(InputAction.CallbackContext context);
void OnBoost(InputAction.CallbackContext context);
void OnShoot(InputAction.CallbackContext context);
}

View File

@ -23,6 +23,15 @@
"interactions": "",
"initialStateCheck": true
},
{
"name": "Radial",
"type": "Value",
"id": "c3561fdc-5277-4bd1-9bd1-d0192276393d",
"expectedControlType": "Vector2",
"processors": "",
"interactions": "",
"initialStateCheck": true
},
{
"name": "Boost",
"type": "PassThrough",
@ -427,6 +436,17 @@
"action": "Shoot",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "a111113b-812b-4220-85fd-5bf80a61f1b1",
"path": "<Gamepad>/leftStick",
"interactions": "",
"processors": "",
"groups": "Controller",
"action": "Radial",
"isComposite": false,
"isPartOfComposite": false
}
]
},