рефакторю управление игроком
This commit is contained in:
1 parent
2746850727
commit
f632508497
18 files changed
+1044
-66
No files matched your search
@@ -151,6 +151,16 @@ public partial class @PlayerControls: IInputActionCollection2, IDisposable
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false,
|
||||
""priority"": 0
|
||||
},
|
||||
{
|
||||
""name"": ""Attack"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""68813cd9-75a1-4031-b390-a01395eef173"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false,
|
||||
""priority"": 0
|
||||
}
|
||||
],
|
||||
""bindings"": [
|
||||
@@ -263,6 +273,17 @@ public partial class @PlayerControls: IInputActionCollection2, IDisposable
|
||||
""action"": ""EnterMenu"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""7b7eeb94-7e87-4db8-a3e0-0b75c77293b9"",
|
||||
""path"": ""<Mouse>/leftButton"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""Attack"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -277,6 +298,7 @@ public partial class @PlayerControls: IInputActionCollection2, IDisposable
|
||||
m_Player_Crouch = m_Player.FindAction("Crouch", throwIfNotFound: true);
|
||||
m_Player_Look = m_Player.FindAction("Look", throwIfNotFound: true);
|
||||
m_Player_EnterMenu = m_Player.FindAction("EnterMenu", throwIfNotFound: true);
|
||||
m_Player_Attack = m_Player.FindAction("Attack", throwIfNotFound: true);
|
||||
}
|
||||
|
||||
~@PlayerControls()
|
||||
@@ -363,6 +385,7 @@ public partial class @PlayerControls: IInputActionCollection2, IDisposable
|
||||
private readonly InputAction m_Player_Crouch;
|
||||
private readonly InputAction m_Player_Look;
|
||||
private readonly InputAction m_Player_EnterMenu;
|
||||
private readonly InputAction m_Player_Attack;
|
||||
/// <summary>
|
||||
/// Provides access to input actions defined in input action map "Player".
|
||||
/// </summary>
|
||||
@@ -399,6 +422,10 @@ public partial class @PlayerControls: IInputActionCollection2, IDisposable
|
||||
/// </summary>
|
||||
public InputAction @EnterMenu => m_Wrapper.m_Player_EnterMenu;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "Player/Attack".
|
||||
/// </summary>
|
||||
public InputAction @Attack => m_Wrapper.m_Player_Attack;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action map instance.
|
||||
/// </summary>
|
||||
public InputActionMap Get() { return m_Wrapper.m_Player; }
|
||||
@@ -442,6 +469,9 @@ public partial class @PlayerControls: IInputActionCollection2, IDisposable
|
||||
@EnterMenu.started += instance.OnEnterMenu;
|
||||
@EnterMenu.performed += instance.OnEnterMenu;
|
||||
@EnterMenu.canceled += instance.OnEnterMenu;
|
||||
@Attack.started += instance.OnAttack;
|
||||
@Attack.performed += instance.OnAttack;
|
||||
@Attack.canceled += instance.OnAttack;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -471,6 +501,9 @@ public partial class @PlayerControls: IInputActionCollection2, IDisposable
|
||||
@EnterMenu.started -= instance.OnEnterMenu;
|
||||
@EnterMenu.performed -= instance.OnEnterMenu;
|
||||
@EnterMenu.canceled -= instance.OnEnterMenu;
|
||||
@Attack.started -= instance.OnAttack;
|
||||
@Attack.performed -= instance.OnAttack;
|
||||
@Attack.canceled -= instance.OnAttack;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -553,5 +586,12 @@ public partial class @PlayerControls: IInputActionCollection2, IDisposable
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnEnterMenu(InputAction.CallbackContext context);
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "Attack" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnAttack(InputAction.CallbackContext context);
|
||||
}
|
||||
}
|
||||
@@ -65,6 +65,16 @@
|
||||
"interactions": "",
|
||||
"initialStateCheck": false,
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"name": "Attack",
|
||||
"type": "Button",
|
||||
"id": "68813cd9-75a1-4031-b390-a01395eef173",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false,
|
||||
"priority": 0
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
@@ -177,6 +187,17 @@
|
||||
"action": "EnterMenu",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "7b7eeb94-7e87-4db8-a3e0-0b75c77293b9",
|
||||
"path": "<Mouse>/leftButton",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Attack",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user