2026-05-15 공격과 피격

This commit is contained in:
2026-05-15 15:28:13 +09:00
parent 764bc305f7
commit ec353d0fd4
81 changed files with 879 additions and 57 deletions

View File

@@ -109,6 +109,24 @@ public @GameInput()
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Punch"",
""type"": ""Button"",
""id"": ""3dcb1343-a166-469d-990e-24ccedf2d09e"",
""expectedControlType"": """",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Kick"",
""type"": ""Button"",
""id"": ""1af50460-846d-4f2a-8030-f9712ad7df6b"",
""expectedControlType"": """",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
@@ -177,6 +195,28 @@ public @GameInput()
""action"": ""Jump"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""9f28cd37-d35c-4f36-8af0-a0020d508486"",
""path"": ""<Keyboard>/z"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Punch"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""43e56be6-df9b-4845-ba12-cd109ac1ffa0"",
""path"": ""<Keyboard>/x"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Kick"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
}
@@ -187,6 +227,8 @@ public @GameInput()
m_Player = asset.FindActionMap("Player", throwIfNotFound: true);
m_Player_Move = m_Player.FindAction("Move", throwIfNotFound: true);
m_Player_Jump = m_Player.FindAction("Jump", throwIfNotFound: true);
m_Player_Punch = m_Player.FindAction("Punch", throwIfNotFound: true);
m_Player_Kick = m_Player.FindAction("Kick", throwIfNotFound: true);
}
~@GameInput()
@@ -269,6 +311,8 @@ public int FindBinding(InputBinding bindingMask, out InputAction action)
private List<IPlayerActions> m_PlayerActionsCallbackInterfaces = new List<IPlayerActions>();
private readonly InputAction m_Player_Move;
private readonly InputAction m_Player_Jump;
private readonly InputAction m_Player_Punch;
private readonly InputAction m_Player_Kick;
/// <summary>
/// Provides access to input actions defined in input action map "Player".
/// </summary>
@@ -289,6 +333,14 @@ public struct PlayerActions
/// </summary>
public InputAction @Jump => m_Wrapper.m_Player_Jump;
/// <summary>
/// Provides access to the underlying input action "Player/Punch".
/// </summary>
public InputAction @Punch => m_Wrapper.m_Player_Punch;
/// <summary>
/// Provides access to the underlying input action "Player/Kick".
/// </summary>
public InputAction @Kick => m_Wrapper.m_Player_Kick;
/// <summary>
/// Provides access to the underlying input action map instance.
/// </summary>
public InputActionMap Get() { return m_Wrapper.m_Player; }
@@ -320,6 +372,12 @@ public void AddCallbacks(IPlayerActions instance)
@Jump.started += instance.OnJump;
@Jump.performed += instance.OnJump;
@Jump.canceled += instance.OnJump;
@Punch.started += instance.OnPunch;
@Punch.performed += instance.OnPunch;
@Punch.canceled += instance.OnPunch;
@Kick.started += instance.OnKick;
@Kick.performed += instance.OnKick;
@Kick.canceled += instance.OnKick;
}
/// <summary>
@@ -337,6 +395,12 @@ private void UnregisterCallbacks(IPlayerActions instance)
@Jump.started -= instance.OnJump;
@Jump.performed -= instance.OnJump;
@Jump.canceled -= instance.OnJump;
@Punch.started -= instance.OnPunch;
@Punch.performed -= instance.OnPunch;
@Punch.canceled -= instance.OnPunch;
@Kick.started -= instance.OnKick;
@Kick.performed -= instance.OnKick;
@Kick.canceled -= instance.OnKick;
}
/// <summary>
@@ -391,5 +455,19 @@ public interface IPlayerActions
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnJump(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "Punch" 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 OnPunch(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "Kick" 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 OnKick(InputAction.CallbackContext context);
}
}