건물 건설 모드 및 건설 인터랙션
This commit is contained in:
@@ -72,7 +72,7 @@ using UnityEngine.InputSystem.Utilities;
|
||||
/// }
|
||||
/// </code>
|
||||
/// </example>
|
||||
public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides access to the underlying asset instance.
|
||||
@@ -82,7 +82,7 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
/// <summary>
|
||||
/// Constructs a new instance.
|
||||
/// </summary>
|
||||
public @InputSystem_Actions()
|
||||
public @PlayerInputActions()
|
||||
{
|
||||
asset = InputActionAsset.FromJson(@"{
|
||||
""version"": 1,
|
||||
@@ -110,20 +110,11 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": true
|
||||
},
|
||||
{
|
||||
""name"": ""Attack"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""6c2ab1b8-8984-453a-af3d-a3c78ae1679a"",
|
||||
""expectedControlType"": ""Button"",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""Interact"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""852140f2-7766-474d-8707-702459ba45f3"",
|
||||
""expectedControlType"": ""Button"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": ""Hold"",
|
||||
""initialStateCheck"": false
|
||||
@@ -141,7 +132,7 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
""name"": ""Jump"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""f1ba0d36-48eb-4cd5-b651-1c94a6531f70"",
|
||||
""expectedControlType"": ""Button"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
@@ -150,7 +141,7 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
""name"": ""Previous"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""2776c80d-3c14-4091-8c56-d04ced07a2b0"",
|
||||
""expectedControlType"": ""Button"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
@@ -172,6 +163,33 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""ToggleBuild"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""d0be6772-d106-4d28-95db-42e006045d09"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""Build"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""4882dd65-9e5d-429b-8920-d024e1dc7f40"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""Cancel"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""15a06032-857d-4655-9d22-c60046a9db21"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
}
|
||||
],
|
||||
""bindings"": [
|
||||
@@ -340,72 +358,6 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""143bb1cd-cc10-4eca-a2f0-a3664166fe91"",
|
||||
""path"": ""<Gamepad>/buttonWest"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": "";Gamepad"",
|
||||
""action"": ""Attack"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""05f6913d-c316-48b2-a6bb-e225f14c7960"",
|
||||
""path"": ""<Mouse>/leftButton"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": "";Keyboard&Mouse"",
|
||||
""action"": ""Attack"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""886e731e-7071-4ae4-95c0-e61739dad6fd"",
|
||||
""path"": ""<Touchscreen>/primaryTouch/tap"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": "";Touch"",
|
||||
""action"": ""Attack"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""ee3d0cd2-254e-47a7-a8cb-bc94d9658c54"",
|
||||
""path"": ""<Joystick>/trigger"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""Joystick"",
|
||||
""action"": ""Attack"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""8255d333-5683-4943-a58a-ccb207ff1dce"",
|
||||
""path"": ""<XRController>/{PrimaryAction}"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""XR"",
|
||||
""action"": ""Attack"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""b3c1c7f0-bd20-4ee7-a0f1-899b24bca6d7"",
|
||||
""path"": ""<Keyboard>/enter"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""Keyboard&Mouse"",
|
||||
""action"": ""Attack"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""cbac6039-9c09-46a1-b5f2-4e5124ccb5ed"",
|
||||
@@ -559,6 +511,50 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
""action"": ""Crouch"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""b0c31ff4-28e1-4221-8a1a-4ce414c9c8a9"",
|
||||
""path"": ""<Keyboard>/b"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": "";Keyboard&Mouse"",
|
||||
""action"": ""ToggleBuild"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""4a4508a3-a4bc-4f26-85d2-53b4364920c5"",
|
||||
""path"": ""<Mouse>/leftButton"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": "";Keyboard&Mouse"",
|
||||
""action"": ""Build"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""ea2b9aa8-a065-48f0-8de0-037adf5d260f"",
|
||||
""path"": ""<Mouse>/rightButton"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": "";Keyboard&Mouse"",
|
||||
""action"": ""Cancel"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""798d6431-b2de-4aad-b19c-05895bdb375b"",
|
||||
""path"": ""<Keyboard>/escape"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": "";Keyboard&Mouse"",
|
||||
""action"": ""Cancel"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1146,13 +1142,15 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
m_Player = asset.FindActionMap("Player", throwIfNotFound: true);
|
||||
m_Player_Move = m_Player.FindAction("Move", throwIfNotFound: true);
|
||||
m_Player_Look = m_Player.FindAction("Look", throwIfNotFound: true);
|
||||
m_Player_Attack = m_Player.FindAction("Attack", throwIfNotFound: true);
|
||||
m_Player_Interact = m_Player.FindAction("Interact", throwIfNotFound: true);
|
||||
m_Player_Crouch = m_Player.FindAction("Crouch", throwIfNotFound: true);
|
||||
m_Player_Jump = m_Player.FindAction("Jump", throwIfNotFound: true);
|
||||
m_Player_Previous = m_Player.FindAction("Previous", throwIfNotFound: true);
|
||||
m_Player_Next = m_Player.FindAction("Next", throwIfNotFound: true);
|
||||
m_Player_Sprint = m_Player.FindAction("Sprint", throwIfNotFound: true);
|
||||
m_Player_ToggleBuild = m_Player.FindAction("ToggleBuild", throwIfNotFound: true);
|
||||
m_Player_Build = m_Player.FindAction("Build", throwIfNotFound: true);
|
||||
m_Player_Cancel = m_Player.FindAction("Cancel", throwIfNotFound: true);
|
||||
// UI
|
||||
m_UI = asset.FindActionMap("UI", throwIfNotFound: true);
|
||||
m_UI_Navigate = m_UI.FindAction("Navigate", throwIfNotFound: true);
|
||||
@@ -1167,10 +1165,10 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
m_UI_TrackedDeviceOrientation = m_UI.FindAction("TrackedDeviceOrientation", throwIfNotFound: true);
|
||||
}
|
||||
|
||||
~@InputSystem_Actions()
|
||||
~@PlayerInputActions()
|
||||
{
|
||||
UnityEngine.Debug.Assert(!m_Player.enabled, "This will cause a leak and performance issues, InputSystem_Actions.Player.Disable() has not been called.");
|
||||
UnityEngine.Debug.Assert(!m_UI.enabled, "This will cause a leak and performance issues, InputSystem_Actions.UI.Disable() has not been called.");
|
||||
UnityEngine.Debug.Assert(!m_Player.enabled, "This will cause a leak and performance issues, PlayerInputActions.Player.Disable() has not been called.");
|
||||
UnityEngine.Debug.Assert(!m_UI.enabled, "This will cause a leak and performance issues, PlayerInputActions.UI.Disable() has not been called.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1248,24 +1246,26 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
private List<IPlayerActions> m_PlayerActionsCallbackInterfaces = new List<IPlayerActions>();
|
||||
private readonly InputAction m_Player_Move;
|
||||
private readonly InputAction m_Player_Look;
|
||||
private readonly InputAction m_Player_Attack;
|
||||
private readonly InputAction m_Player_Interact;
|
||||
private readonly InputAction m_Player_Crouch;
|
||||
private readonly InputAction m_Player_Jump;
|
||||
private readonly InputAction m_Player_Previous;
|
||||
private readonly InputAction m_Player_Next;
|
||||
private readonly InputAction m_Player_Sprint;
|
||||
private readonly InputAction m_Player_ToggleBuild;
|
||||
private readonly InputAction m_Player_Build;
|
||||
private readonly InputAction m_Player_Cancel;
|
||||
/// <summary>
|
||||
/// Provides access to input actions defined in input action map "Player".
|
||||
/// </summary>
|
||||
public struct PlayerActions
|
||||
{
|
||||
private @InputSystem_Actions m_Wrapper;
|
||||
private @PlayerInputActions m_Wrapper;
|
||||
|
||||
/// <summary>
|
||||
/// Construct a new instance of the input action map wrapper class.
|
||||
/// </summary>
|
||||
public PlayerActions(@InputSystem_Actions wrapper) { m_Wrapper = wrapper; }
|
||||
public PlayerActions(@PlayerInputActions wrapper) { m_Wrapper = wrapper; }
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "Player/Move".
|
||||
/// </summary>
|
||||
@@ -1275,10 +1275,6 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
/// </summary>
|
||||
public InputAction @Look => m_Wrapper.m_Player_Look;
|
||||
/// <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 "Player/Interact".
|
||||
/// </summary>
|
||||
public InputAction @Interact => m_Wrapper.m_Player_Interact;
|
||||
@@ -1303,6 +1299,18 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
/// </summary>
|
||||
public InputAction @Sprint => m_Wrapper.m_Player_Sprint;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "Player/ToggleBuild".
|
||||
/// </summary>
|
||||
public InputAction @ToggleBuild => m_Wrapper.m_Player_ToggleBuild;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "Player/Build".
|
||||
/// </summary>
|
||||
public InputAction @Build => m_Wrapper.m_Player_Build;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "Player/Cancel".
|
||||
/// </summary>
|
||||
public InputAction @Cancel => m_Wrapper.m_Player_Cancel;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action map instance.
|
||||
/// </summary>
|
||||
public InputActionMap Get() { return m_Wrapper.m_Player; }
|
||||
@@ -1334,9 +1342,6 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
@Look.started += instance.OnLook;
|
||||
@Look.performed += instance.OnLook;
|
||||
@Look.canceled += instance.OnLook;
|
||||
@Attack.started += instance.OnAttack;
|
||||
@Attack.performed += instance.OnAttack;
|
||||
@Attack.canceled += instance.OnAttack;
|
||||
@Interact.started += instance.OnInteract;
|
||||
@Interact.performed += instance.OnInteract;
|
||||
@Interact.canceled += instance.OnInteract;
|
||||
@@ -1355,6 +1360,15 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
@Sprint.started += instance.OnSprint;
|
||||
@Sprint.performed += instance.OnSprint;
|
||||
@Sprint.canceled += instance.OnSprint;
|
||||
@ToggleBuild.started += instance.OnToggleBuild;
|
||||
@ToggleBuild.performed += instance.OnToggleBuild;
|
||||
@ToggleBuild.canceled += instance.OnToggleBuild;
|
||||
@Build.started += instance.OnBuild;
|
||||
@Build.performed += instance.OnBuild;
|
||||
@Build.canceled += instance.OnBuild;
|
||||
@Cancel.started += instance.OnCancel;
|
||||
@Cancel.performed += instance.OnCancel;
|
||||
@Cancel.canceled += instance.OnCancel;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1372,9 +1386,6 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
@Look.started -= instance.OnLook;
|
||||
@Look.performed -= instance.OnLook;
|
||||
@Look.canceled -= instance.OnLook;
|
||||
@Attack.started -= instance.OnAttack;
|
||||
@Attack.performed -= instance.OnAttack;
|
||||
@Attack.canceled -= instance.OnAttack;
|
||||
@Interact.started -= instance.OnInteract;
|
||||
@Interact.performed -= instance.OnInteract;
|
||||
@Interact.canceled -= instance.OnInteract;
|
||||
@@ -1393,6 +1404,15 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
@Sprint.started -= instance.OnSprint;
|
||||
@Sprint.performed -= instance.OnSprint;
|
||||
@Sprint.canceled -= instance.OnSprint;
|
||||
@ToggleBuild.started -= instance.OnToggleBuild;
|
||||
@ToggleBuild.performed -= instance.OnToggleBuild;
|
||||
@ToggleBuild.canceled -= instance.OnToggleBuild;
|
||||
@Build.started -= instance.OnBuild;
|
||||
@Build.performed -= instance.OnBuild;
|
||||
@Build.canceled -= instance.OnBuild;
|
||||
@Cancel.started -= instance.OnCancel;
|
||||
@Cancel.performed -= instance.OnCancel;
|
||||
@Cancel.canceled -= instance.OnCancel;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1445,12 +1465,12 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
/// </summary>
|
||||
public struct UIActions
|
||||
{
|
||||
private @InputSystem_Actions m_Wrapper;
|
||||
private @PlayerInputActions m_Wrapper;
|
||||
|
||||
/// <summary>
|
||||
/// Construct a new instance of the input action map wrapper class.
|
||||
/// </summary>
|
||||
public UIActions(@InputSystem_Actions wrapper) { m_Wrapper = wrapper; }
|
||||
public UIActions(@PlayerInputActions wrapper) { m_Wrapper = wrapper; }
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "UI/Navigate".
|
||||
/// </summary>
|
||||
@@ -1708,13 +1728,6 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnLook(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);
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "Interact" 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" />
|
||||
@@ -1756,6 +1769,27 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnSprint(InputAction.CallbackContext context);
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "ToggleBuild" 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 OnToggleBuild(InputAction.CallbackContext context);
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "Build" 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 OnBuild(InputAction.CallbackContext context);
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "Cancel" 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 OnCancel(InputAction.CallbackContext context);
|
||||
}
|
||||
/// <summary>
|
||||
/// Interface to implement callback methods for all input action callbacks associated with input actions defined by "UI" which allows adding and removing callbacks.
|
||||
|
||||
Reference in New Issue
Block a user