386 lines
15 KiB
C#
386 lines
15 KiB
C#
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
|
|
// version 1.4.4
|
|
// from Assets/PlayerInputActions.inputactions
|
|
//
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine.InputSystem;
|
|
using UnityEngine.InputSystem.Utilities;
|
|
|
|
public partial class @PlayerInputActions : IInputActionCollection2, IDisposable
|
|
{
|
|
public InputActionAsset asset { get; }
|
|
public @PlayerInputActions()
|
|
{
|
|
asset = InputActionAsset.FromJson(@"{
|
|
""name"": ""PlayerInputActions"",
|
|
""maps"": [
|
|
{
|
|
""name"": ""Player"",
|
|
""id"": ""ee5e51f4-8b08-49fc-90eb-52682e031d07"",
|
|
""actions"": [
|
|
{
|
|
""name"": ""Move"",
|
|
""type"": ""Value"",
|
|
""id"": ""a1b07617-998a-4c61-b19e-6d4bb1308d0e"",
|
|
""expectedControlType"": ""Vector2"",
|
|
""processors"": """",
|
|
""interactions"": """",
|
|
""initialStateCheck"": true
|
|
},
|
|
{
|
|
""name"": ""Interact"",
|
|
""type"": ""Button"",
|
|
""id"": ""2fd02290-8577-4db2-bcee-9ab6bd10145d"",
|
|
""expectedControlType"": ""Button"",
|
|
""processors"": """",
|
|
""interactions"": """",
|
|
""initialStateCheck"": false
|
|
},
|
|
{
|
|
""name"": ""InteractAlternate"",
|
|
""type"": ""Button"",
|
|
""id"": ""c52d17e5-b60f-4aeb-9eea-8ea14a7bc8a4"",
|
|
""expectedControlType"": ""Button"",
|
|
""processors"": """",
|
|
""interactions"": """",
|
|
""initialStateCheck"": false
|
|
},
|
|
{
|
|
""name"": ""Pause"",
|
|
""type"": ""Button"",
|
|
""id"": ""f533f0c6-a526-45d1-ab00-ed86c15608d8"",
|
|
""expectedControlType"": ""Button"",
|
|
""processors"": """",
|
|
""interactions"": """",
|
|
""initialStateCheck"": false
|
|
}
|
|
],
|
|
""bindings"": [
|
|
{
|
|
""name"": ""WASD"",
|
|
""id"": ""a6b015f6-1004-4e32-b882-631ef66db7e3"",
|
|
""path"": ""2DVector"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Move"",
|
|
""isComposite"": true,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": ""up"",
|
|
""id"": ""13846bd9-5b0e-47a9-9b42-dbe1460c2e85"",
|
|
""path"": ""<Keyboard>/w"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""down"",
|
|
""id"": ""4ecc1af6-5d24-4772-aade-92f1494f5bf0"",
|
|
""path"": ""<Keyboard>/s"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""left"",
|
|
""id"": ""0e503079-61d2-4799-9014-d53dff129bc5"",
|
|
""path"": ""<Keyboard>/a"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""right"",
|
|
""id"": ""e367203c-d448-414b-9420-a77322ddf2e4"",
|
|
""path"": ""<Keyboard>/d"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""Arrow Keys"",
|
|
""id"": ""ee4adbda-6bf6-49a4-a142-1169a1bb796c"",
|
|
""path"": ""2DVector"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Move"",
|
|
""isComposite"": true,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": ""up"",
|
|
""id"": ""520af100-1a23-4d8b-812e-51782fff4899"",
|
|
""path"": ""<Keyboard>/upArrow"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""down"",
|
|
""id"": ""50e5faa0-705c-4cd4-b885-8550f02436a9"",
|
|
""path"": ""<Keyboard>/downArrow"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""left"",
|
|
""id"": ""9d6d88a7-9359-4c4e-92b9-3fabc8175e96"",
|
|
""path"": ""<Keyboard>/leftArrow"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""right"",
|
|
""id"": ""9ab83dac-5f13-488d-8d65-d25b7cd2ebcd"",
|
|
""path"": ""<Keyboard>/rightArrow"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""848d3f2b-264f-4cd6-a75c-32ea2d95a930"",
|
|
""path"": ""<Gamepad>/leftStick"",
|
|
""interactions"": """",
|
|
""processors"": ""StickDeadzone(min=0.5)"",
|
|
""groups"": """",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""6f0f358a-7b5c-4b3a-86c3-06e0190a02ec"",
|
|
""path"": ""<Keyboard>/e"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Interact"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""ba1d581e-0e18-44b6-b9eb-e5907691776f"",
|
|
""path"": ""<Gamepad>/buttonSouth"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Interact"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""55026678-500a-4ee6-ac4a-68cfda2a3a56"",
|
|
""path"": ""<Keyboard>/f"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""InteractAlternate"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""b2aedbe4-155b-433d-b39d-01f25f42d1ae"",
|
|
""path"": ""<Gamepad>/buttonWest"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""InteractAlternate"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""caf14e06-9cd7-44b8-b0dd-67589d8b602c"",
|
|
""path"": ""<Keyboard>/escape"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Pause"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""71b4cd64-4d10-4a9b-989f-c9e7726f9c7b"",
|
|
""path"": ""<Gamepad>/start"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Pause"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
}
|
|
]
|
|
}
|
|
],
|
|
""controlSchemes"": []
|
|
}");
|
|
// Player
|
|
m_Player = asset.FindActionMap("Player", throwIfNotFound: true);
|
|
m_Player_Move = m_Player.FindAction("Move", throwIfNotFound: true);
|
|
m_Player_Interact = m_Player.FindAction("Interact", throwIfNotFound: true);
|
|
m_Player_InteractAlternate = m_Player.FindAction("InteractAlternate", throwIfNotFound: true);
|
|
m_Player_Pause = m_Player.FindAction("Pause", throwIfNotFound: true);
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
UnityEngine.Object.Destroy(asset);
|
|
}
|
|
|
|
public InputBinding? bindingMask
|
|
{
|
|
get => asset.bindingMask;
|
|
set => asset.bindingMask = value;
|
|
}
|
|
|
|
public ReadOnlyArray<InputDevice>? devices
|
|
{
|
|
get => asset.devices;
|
|
set => asset.devices = value;
|
|
}
|
|
|
|
public ReadOnlyArray<InputControlScheme> controlSchemes => asset.controlSchemes;
|
|
|
|
public bool Contains(InputAction action)
|
|
{
|
|
return asset.Contains(action);
|
|
}
|
|
|
|
public IEnumerator<InputAction> GetEnumerator()
|
|
{
|
|
return asset.GetEnumerator();
|
|
}
|
|
|
|
IEnumerator IEnumerable.GetEnumerator()
|
|
{
|
|
return GetEnumerator();
|
|
}
|
|
|
|
public void Enable()
|
|
{
|
|
asset.Enable();
|
|
}
|
|
|
|
public void Disable()
|
|
{
|
|
asset.Disable();
|
|
}
|
|
public IEnumerable<InputBinding> bindings => asset.bindings;
|
|
|
|
public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false)
|
|
{
|
|
return asset.FindAction(actionNameOrId, throwIfNotFound);
|
|
}
|
|
public int FindBinding(InputBinding bindingMask, out InputAction action)
|
|
{
|
|
return asset.FindBinding(bindingMask, out action);
|
|
}
|
|
|
|
// Player
|
|
private readonly InputActionMap m_Player;
|
|
private IPlayerActions m_PlayerActionsCallbackInterface;
|
|
private readonly InputAction m_Player_Move;
|
|
private readonly InputAction m_Player_Interact;
|
|
private readonly InputAction m_Player_InteractAlternate;
|
|
private readonly InputAction m_Player_Pause;
|
|
public struct PlayerActions
|
|
{
|
|
private @PlayerInputActions m_Wrapper;
|
|
public PlayerActions(@PlayerInputActions wrapper) { m_Wrapper = wrapper; }
|
|
public InputAction @Move => m_Wrapper.m_Player_Move;
|
|
public InputAction @Interact => m_Wrapper.m_Player_Interact;
|
|
public InputAction @InteractAlternate => m_Wrapper.m_Player_InteractAlternate;
|
|
public InputAction @Pause => m_Wrapper.m_Player_Pause;
|
|
public InputActionMap Get() { return m_Wrapper.m_Player; }
|
|
public void Enable() { Get().Enable(); }
|
|
public void Disable() { Get().Disable(); }
|
|
public bool enabled => Get().enabled;
|
|
public static implicit operator InputActionMap(PlayerActions set) { return set.Get(); }
|
|
public void SetCallbacks(IPlayerActions instance)
|
|
{
|
|
if (m_Wrapper.m_PlayerActionsCallbackInterface != null)
|
|
{
|
|
@Move.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnMove;
|
|
@Move.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnMove;
|
|
@Move.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnMove;
|
|
@Interact.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnInteract;
|
|
@Interact.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnInteract;
|
|
@Interact.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnInteract;
|
|
@InteractAlternate.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnInteractAlternate;
|
|
@InteractAlternate.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnInteractAlternate;
|
|
@InteractAlternate.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnInteractAlternate;
|
|
@Pause.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnPause;
|
|
@Pause.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnPause;
|
|
@Pause.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnPause;
|
|
}
|
|
m_Wrapper.m_PlayerActionsCallbackInterface = instance;
|
|
if (instance != null)
|
|
{
|
|
@Move.started += instance.OnMove;
|
|
@Move.performed += instance.OnMove;
|
|
@Move.canceled += instance.OnMove;
|
|
@Interact.started += instance.OnInteract;
|
|
@Interact.performed += instance.OnInteract;
|
|
@Interact.canceled += instance.OnInteract;
|
|
@InteractAlternate.started += instance.OnInteractAlternate;
|
|
@InteractAlternate.performed += instance.OnInteractAlternate;
|
|
@InteractAlternate.canceled += instance.OnInteractAlternate;
|
|
@Pause.started += instance.OnPause;
|
|
@Pause.performed += instance.OnPause;
|
|
@Pause.canceled += instance.OnPause;
|
|
}
|
|
}
|
|
}
|
|
public PlayerActions @Player => new PlayerActions(this);
|
|
public interface IPlayerActions
|
|
{
|
|
void OnMove(InputAction.CallbackContext context);
|
|
void OnInteract(InputAction.CallbackContext context);
|
|
void OnInteractAlternate(InputAction.CallbackContext context);
|
|
void OnPause(InputAction.CallbackContext context);
|
|
}
|
|
}
|