2026-06-15 리듬게임 프로토타입
This commit is contained in:
@@ -100,6 +100,24 @@ public @GameInput()
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""Key_Left"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""5afd9129-22e8-4e22-9843-f936922fc2a9"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""Key_Right"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""5d342104-f81c-46cf-af37-f9388136115b"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
}
|
||||
],
|
||||
""bindings"": [
|
||||
@@ -113,6 +131,28 @@ public @GameInput()
|
||||
""action"": ""Jump"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""8de0c981-8048-4b3e-baf8-d77cf3dbcc39"",
|
||||
""path"": ""<Keyboard>/leftArrow"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""Key_Left"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""e2dedd13-89db-4921-8a87-303eaded5f2e"",
|
||||
""path"": ""<Keyboard>/rightArrow"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""Key_Right"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -122,6 +162,8 @@ public @GameInput()
|
||||
// Player
|
||||
m_Player = asset.FindActionMap("Player", throwIfNotFound: true);
|
||||
m_Player_Jump = m_Player.FindAction("Jump", throwIfNotFound: true);
|
||||
m_Player_Key_Left = m_Player.FindAction("Key_Left", throwIfNotFound: true);
|
||||
m_Player_Key_Right = m_Player.FindAction("Key_Right", throwIfNotFound: true);
|
||||
}
|
||||
|
||||
~@GameInput()
|
||||
@@ -203,6 +245,8 @@ public int FindBinding(InputBinding bindingMask, out InputAction action)
|
||||
private readonly InputActionMap m_Player;
|
||||
private List<IPlayerActions> m_PlayerActionsCallbackInterfaces = new List<IPlayerActions>();
|
||||
private readonly InputAction m_Player_Jump;
|
||||
private readonly InputAction m_Player_Key_Left;
|
||||
private readonly InputAction m_Player_Key_Right;
|
||||
/// <summary>
|
||||
/// Provides access to input actions defined in input action map "Player".
|
||||
/// </summary>
|
||||
@@ -219,6 +263,14 @@ public struct PlayerActions
|
||||
/// </summary>
|
||||
public InputAction @Jump => m_Wrapper.m_Player_Jump;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "Player/Key_Left".
|
||||
/// </summary>
|
||||
public InputAction @Key_Left => m_Wrapper.m_Player_Key_Left;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "Player/Key_Right".
|
||||
/// </summary>
|
||||
public InputAction @Key_Right => m_Wrapper.m_Player_Key_Right;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action map instance.
|
||||
/// </summary>
|
||||
public InputActionMap Get() { return m_Wrapper.m_Player; }
|
||||
@@ -247,6 +299,12 @@ public void AddCallbacks(IPlayerActions instance)
|
||||
@Jump.started += instance.OnJump;
|
||||
@Jump.performed += instance.OnJump;
|
||||
@Jump.canceled += instance.OnJump;
|
||||
@Key_Left.started += instance.OnKey_Left;
|
||||
@Key_Left.performed += instance.OnKey_Left;
|
||||
@Key_Left.canceled += instance.OnKey_Left;
|
||||
@Key_Right.started += instance.OnKey_Right;
|
||||
@Key_Right.performed += instance.OnKey_Right;
|
||||
@Key_Right.canceled += instance.OnKey_Right;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -261,6 +319,12 @@ private void UnregisterCallbacks(IPlayerActions instance)
|
||||
@Jump.started -= instance.OnJump;
|
||||
@Jump.performed -= instance.OnJump;
|
||||
@Jump.canceled -= instance.OnJump;
|
||||
@Key_Left.started -= instance.OnKey_Left;
|
||||
@Key_Left.performed -= instance.OnKey_Left;
|
||||
@Key_Left.canceled -= instance.OnKey_Left;
|
||||
@Key_Right.started -= instance.OnKey_Right;
|
||||
@Key_Right.performed -= instance.OnKey_Right;
|
||||
@Key_Right.canceled -= instance.OnKey_Right;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -308,5 +372,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 "Key_Left" 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 OnKey_Left(InputAction.CallbackContext context);
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "Key_Right" 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 OnKey_Right(InputAction.CallbackContext context);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user