Add input for regular attack
This commit is contained in:
parent
709e2ccfda
commit
9809f68561
@ -53,6 +53,15 @@ public partial class @GameInputs: IInputActionCollection2, IDisposable
|
||||
""processors"": """",
|
||||
""interactions"": ""Press"",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""RegularAttack"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""1b63c7a8-b38a-4050-86f5-db04b5c6d21c"",
|
||||
""expectedControlType"": ""Button"",
|
||||
""processors"": """",
|
||||
""interactions"": ""Press"",
|
||||
""initialStateCheck"": false
|
||||
}
|
||||
],
|
||||
""bindings"": [
|
||||
@ -165,6 +174,28 @@ public partial class @GameInputs: IInputActionCollection2, IDisposable
|
||||
""action"": ""ChangeCharacter"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""e06101a4-1362-4374-9fdf-ae2d6d579159"",
|
||||
""path"": ""<Mouse>/leftButton"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""RegularAttack"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""69b0ae90-0790-4ed6-a21f-020bda1bcf93"",
|
||||
""path"": ""<Gamepad>/rightTrigger"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""RegularAttack"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -176,6 +207,7 @@ public partial class @GameInputs: IInputActionCollection2, IDisposable
|
||||
m_Player_Movement = m_Player.FindAction("Movement", throwIfNotFound: true);
|
||||
m_Player_Jump = m_Player.FindAction("Jump", throwIfNotFound: true);
|
||||
m_Player_ChangeCharacter = m_Player.FindAction("ChangeCharacter", throwIfNotFound: true);
|
||||
m_Player_RegularAttack = m_Player.FindAction("RegularAttack", throwIfNotFound: true);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
@ -240,6 +272,7 @@ public partial class @GameInputs: IInputActionCollection2, IDisposable
|
||||
private readonly InputAction m_Player_Movement;
|
||||
private readonly InputAction m_Player_Jump;
|
||||
private readonly InputAction m_Player_ChangeCharacter;
|
||||
private readonly InputAction m_Player_RegularAttack;
|
||||
public struct PlayerActions
|
||||
{
|
||||
private @GameInputs m_Wrapper;
|
||||
@ -247,6 +280,7 @@ public partial class @GameInputs: IInputActionCollection2, IDisposable
|
||||
public InputAction @Movement => m_Wrapper.m_Player_Movement;
|
||||
public InputAction @Jump => m_Wrapper.m_Player_Jump;
|
||||
public InputAction @ChangeCharacter => m_Wrapper.m_Player_ChangeCharacter;
|
||||
public InputAction @RegularAttack => m_Wrapper.m_Player_RegularAttack;
|
||||
public InputActionMap Get() { return m_Wrapper.m_Player; }
|
||||
public void Enable() { Get().Enable(); }
|
||||
public void Disable() { Get().Disable(); }
|
||||
@ -265,6 +299,9 @@ public partial class @GameInputs: IInputActionCollection2, IDisposable
|
||||
@ChangeCharacter.started += instance.OnChangeCharacter;
|
||||
@ChangeCharacter.performed += instance.OnChangeCharacter;
|
||||
@ChangeCharacter.canceled += instance.OnChangeCharacter;
|
||||
@RegularAttack.started += instance.OnRegularAttack;
|
||||
@RegularAttack.performed += instance.OnRegularAttack;
|
||||
@RegularAttack.canceled += instance.OnRegularAttack;
|
||||
}
|
||||
|
||||
private void UnregisterCallbacks(IPlayerActions instance)
|
||||
@ -278,6 +315,9 @@ public partial class @GameInputs: IInputActionCollection2, IDisposable
|
||||
@ChangeCharacter.started -= instance.OnChangeCharacter;
|
||||
@ChangeCharacter.performed -= instance.OnChangeCharacter;
|
||||
@ChangeCharacter.canceled -= instance.OnChangeCharacter;
|
||||
@RegularAttack.started -= instance.OnRegularAttack;
|
||||
@RegularAttack.performed -= instance.OnRegularAttack;
|
||||
@RegularAttack.canceled -= instance.OnRegularAttack;
|
||||
}
|
||||
|
||||
public void RemoveCallbacks(IPlayerActions instance)
|
||||
@ -300,5 +340,6 @@ public partial class @GameInputs: IInputActionCollection2, IDisposable
|
||||
void OnMovement(InputAction.CallbackContext context);
|
||||
void OnJump(InputAction.CallbackContext context);
|
||||
void OnChangeCharacter(InputAction.CallbackContext context);
|
||||
void OnRegularAttack(InputAction.CallbackContext context);
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,6 +31,15 @@
|
||||
"processors": "",
|
||||
"interactions": "Press",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "RegularAttack",
|
||||
"type": "Button",
|
||||
"id": "1b63c7a8-b38a-4050-86f5-db04b5c6d21c",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": "Press",
|
||||
"initialStateCheck": false
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
@ -143,6 +152,28 @@
|
||||
"action": "ChangeCharacter",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "e06101a4-1362-4374-9fdf-ae2d6d579159",
|
||||
"path": "<Mouse>/leftButton",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "RegularAttack",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "69b0ae90-0790-4ed6-a21f-020bda1bcf93",
|
||||
"path": "<Gamepad>/rightTrigger",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "RegularAttack",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user