KitchenChaos/Assets/Scripts/PlayerInputActions.cs

324 lines
12 KiB
C#

//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.4.4
// from Assets/Scripts/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;
using Object = UnityEngine.Object;
public partial class @PlayerInputActions : IInputActionCollection2, IDisposable
{
public InputActionAsset asset { get; }
public @PlayerInputActions()
{
asset = InputActionAsset.FromJson(@"{
""name"": ""PlayerInputActions"",
""maps"": [
{
""name"": ""Player"",
""id"": ""d3a0c13c-7389-4223-b441-cbc57b78087c"",
""actions"": [
{
""name"": ""Move"",
""type"": ""Value"",
""id"": ""ab2ece00-5902-42f0-bdce-e8d540a36fa6"",
""expectedControlType"": ""Vector2"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": true
},
{
""name"": ""Interact"",
""type"": ""Button"",
""id"": ""7f1ccfa6-961c-4f9a-b03d-a58507c6b357"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""InteractAlternate"",
""type"": ""Button"",
""id"": ""9c791d50-60fc-4e81-b17e-fd72c1c2e6f2"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
{
""name"": ""WASD"",
""id"": ""f5ab4a32-1729-4004-baa6-cdb8e0183e38"",
""path"": ""2DVector"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""a9aa7597-8830-4ee1-adeb-48bb774b3c19"",
""path"": ""<Keyboard>/w"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""5de3afc8-f095-4341-a68e-af8eed936dc7"",
""path"": ""<Keyboard>/s"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""165c4d4c-4aa0-481f-b9ef-2e911d49809b"",
""path"": ""<Keyboard>/a"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""76fa4c70-b99d-482d-8d6e-7c094474fb0a"",
""path"": ""<Keyboard>/d"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""ArrowKeys"",
""id"": ""3b6dd0b6-c313-49e3-88b1-663a3869992c"",
""path"": ""2DVector"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""638b45a1-5a88-45ec-9bb9-5e8c3881b7f5"",
""path"": ""<Keyboard>/upArrow"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""e2f2701f-62da-4275-9208-2e74aecb1df7"",
""path"": ""<Keyboard>/downArrow"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""1c4e3df8-c98e-44d2-8eaf-e50f9f5c1ba9"",
""path"": ""<Keyboard>/leftArrow"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""8cc09150-3fab-419c-950f-d56bcc89cb90"",
""path"": ""<Keyboard>/rightArrow"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": """",
""id"": ""c3d6a2a3-927d-43d9-a23b-40c8bd7189a8"",
""path"": ""<Gamepad>/leftStick"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""9c001e21-ab9c-4e54-a269-416e1671cb5e"",
""path"": ""<Keyboard>/e"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Interact"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""be773d2f-738d-40de-957d-2fe7af7fad66"",
""path"": ""<Keyboard>/f"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""InteractAlternate"",
""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);
}
public void Dispose()
{
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;
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 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;
}
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;
}
}
}
public PlayerActions @Player => new PlayerActions(this);
public interface IPlayerActions
{
void OnMove(InputAction.CallbackContext context);
void OnInteract(InputAction.CallbackContext context);
void OnInteractAlternate(InputAction.CallbackContext context);
}
}