323 lines
12 KiB
C#
323 lines
12 KiB
C#
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
|
|
// version 1.11.2
|
|
// from Assets/Resources/MouseControls.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 @MouseControls: IInputActionCollection2, IDisposable
|
|
{
|
|
public InputActionAsset asset { get; }
|
|
public @MouseControls()
|
|
{
|
|
asset = InputActionAsset.FromJson(@"{
|
|
""name"": ""MouseControls"",
|
|
""maps"": [
|
|
{
|
|
""name"": ""Player"",
|
|
""id"": ""54cc7dab-d206-44e2-ad28-4018586d47ce"",
|
|
""actions"": [
|
|
{
|
|
""name"": ""Click"",
|
|
""type"": ""Button"",
|
|
""id"": ""88d7d766-1007-472e-ae33-ba8569954222"",
|
|
""expectedControlType"": """",
|
|
""processors"": """",
|
|
""interactions"": """",
|
|
""initialStateCheck"": false
|
|
},
|
|
{
|
|
""name"": ""MiddleClick"",
|
|
""type"": ""Button"",
|
|
""id"": ""09456aa4-612d-40bb-b527-6ab97507fa7f"",
|
|
""expectedControlType"": """",
|
|
""processors"": """",
|
|
""interactions"": """",
|
|
""initialStateCheck"": false
|
|
},
|
|
{
|
|
""name"": ""RightClick"",
|
|
""type"": ""Button"",
|
|
""id"": ""adeced83-0144-442e-b0da-51910c88912b"",
|
|
""expectedControlType"": """",
|
|
""processors"": """",
|
|
""interactions"": """",
|
|
""initialStateCheck"": false
|
|
},
|
|
{
|
|
""name"": ""Point"",
|
|
""type"": ""Value"",
|
|
""id"": ""442cf3c8-0613-416e-9e6f-a92ff2058cd0"",
|
|
""expectedControlType"": ""Vector2"",
|
|
""processors"": """",
|
|
""interactions"": """",
|
|
""initialStateCheck"": true
|
|
},
|
|
{
|
|
""name"": ""Scroll"",
|
|
""type"": ""Value"",
|
|
""id"": ""9012f26b-e301-4340-b05f-eaa8ecea5289"",
|
|
""expectedControlType"": ""Vector2"",
|
|
""processors"": """",
|
|
""interactions"": """",
|
|
""initialStateCheck"": true
|
|
},
|
|
{
|
|
""name"": ""Delta"",
|
|
""type"": ""Value"",
|
|
""id"": ""225a6ad6-f6cf-46c1-b522-96bfb4385441"",
|
|
""expectedControlType"": ""Vector2"",
|
|
""processors"": """",
|
|
""interactions"": """",
|
|
""initialStateCheck"": true
|
|
}
|
|
],
|
|
""bindings"": [
|
|
{
|
|
""name"": """",
|
|
""id"": ""35c4559a-a4ae-467f-90ea-21ba08b8a3f3"",
|
|
""path"": ""<Mouse>/leftButton"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Click"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""35cbe4ff-6de8-4994-8166-9e56a39681cd"",
|
|
""path"": ""<Mouse>/middleButton"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""MiddleClick"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""ee014a6b-bc0d-453c-b2ab-77735da0f5dc"",
|
|
""path"": ""<Mouse>/rightButton"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""RightClick"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""93c1a3dc-8f7b-4471-ac5f-dc651fcab248"",
|
|
""path"": ""<Mouse>/position"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Point"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""71fb9f61-0b12-464f-b113-bb6bf3e6dcbf"",
|
|
""path"": ""<Mouse>/scroll"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Scroll"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""85aed182-6406-466b-a222-f7b0f475075b"",
|
|
""path"": ""<Mouse>/delta"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Delta"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
}
|
|
]
|
|
}
|
|
],
|
|
""controlSchemes"": []
|
|
}");
|
|
// Player
|
|
m_Player = asset.FindActionMap("Player", throwIfNotFound: true);
|
|
m_Player_Click = m_Player.FindAction("Click", throwIfNotFound: true);
|
|
m_Player_MiddleClick = m_Player.FindAction("MiddleClick", throwIfNotFound: true);
|
|
m_Player_RightClick = m_Player.FindAction("RightClick", throwIfNotFound: true);
|
|
m_Player_Point = m_Player.FindAction("Point", throwIfNotFound: true);
|
|
m_Player_Scroll = m_Player.FindAction("Scroll", throwIfNotFound: true);
|
|
m_Player_Delta = m_Player.FindAction("Delta", throwIfNotFound: true);
|
|
}
|
|
|
|
~@MouseControls()
|
|
{
|
|
UnityEngine.Debug.Assert(!m_Player.enabled, "This will cause a leak and performance issues, MouseControls.Player.Disable() has not been called.");
|
|
}
|
|
|
|
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 List<IPlayerActions> m_PlayerActionsCallbackInterfaces = new List<IPlayerActions>();
|
|
private readonly InputAction m_Player_Click;
|
|
private readonly InputAction m_Player_MiddleClick;
|
|
private readonly InputAction m_Player_RightClick;
|
|
private readonly InputAction m_Player_Point;
|
|
private readonly InputAction m_Player_Scroll;
|
|
private readonly InputAction m_Player_Delta;
|
|
public struct PlayerActions
|
|
{
|
|
private @MouseControls m_Wrapper;
|
|
public PlayerActions(@MouseControls wrapper) { m_Wrapper = wrapper; }
|
|
public InputAction @Click => m_Wrapper.m_Player_Click;
|
|
public InputAction @MiddleClick => m_Wrapper.m_Player_MiddleClick;
|
|
public InputAction @RightClick => m_Wrapper.m_Player_RightClick;
|
|
public InputAction @Point => m_Wrapper.m_Player_Point;
|
|
public InputAction @Scroll => m_Wrapper.m_Player_Scroll;
|
|
public InputAction @Delta => m_Wrapper.m_Player_Delta;
|
|
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 AddCallbacks(IPlayerActions instance)
|
|
{
|
|
if (instance == null || m_Wrapper.m_PlayerActionsCallbackInterfaces.Contains(instance)) return;
|
|
m_Wrapper.m_PlayerActionsCallbackInterfaces.Add(instance);
|
|
@Click.started += instance.OnClick;
|
|
@Click.performed += instance.OnClick;
|
|
@Click.canceled += instance.OnClick;
|
|
@MiddleClick.started += instance.OnMiddleClick;
|
|
@MiddleClick.performed += instance.OnMiddleClick;
|
|
@MiddleClick.canceled += instance.OnMiddleClick;
|
|
@RightClick.started += instance.OnRightClick;
|
|
@RightClick.performed += instance.OnRightClick;
|
|
@RightClick.canceled += instance.OnRightClick;
|
|
@Point.started += instance.OnPoint;
|
|
@Point.performed += instance.OnPoint;
|
|
@Point.canceled += instance.OnPoint;
|
|
@Scroll.started += instance.OnScroll;
|
|
@Scroll.performed += instance.OnScroll;
|
|
@Scroll.canceled += instance.OnScroll;
|
|
@Delta.started += instance.OnDelta;
|
|
@Delta.performed += instance.OnDelta;
|
|
@Delta.canceled += instance.OnDelta;
|
|
}
|
|
|
|
private void UnregisterCallbacks(IPlayerActions instance)
|
|
{
|
|
@Click.started -= instance.OnClick;
|
|
@Click.performed -= instance.OnClick;
|
|
@Click.canceled -= instance.OnClick;
|
|
@MiddleClick.started -= instance.OnMiddleClick;
|
|
@MiddleClick.performed -= instance.OnMiddleClick;
|
|
@MiddleClick.canceled -= instance.OnMiddleClick;
|
|
@RightClick.started -= instance.OnRightClick;
|
|
@RightClick.performed -= instance.OnRightClick;
|
|
@RightClick.canceled -= instance.OnRightClick;
|
|
@Point.started -= instance.OnPoint;
|
|
@Point.performed -= instance.OnPoint;
|
|
@Point.canceled -= instance.OnPoint;
|
|
@Scroll.started -= instance.OnScroll;
|
|
@Scroll.performed -= instance.OnScroll;
|
|
@Scroll.canceled -= instance.OnScroll;
|
|
@Delta.started -= instance.OnDelta;
|
|
@Delta.performed -= instance.OnDelta;
|
|
@Delta.canceled -= instance.OnDelta;
|
|
}
|
|
|
|
public void RemoveCallbacks(IPlayerActions instance)
|
|
{
|
|
if (m_Wrapper.m_PlayerActionsCallbackInterfaces.Remove(instance))
|
|
UnregisterCallbacks(instance);
|
|
}
|
|
|
|
public void SetCallbacks(IPlayerActions instance)
|
|
{
|
|
foreach (var item in m_Wrapper.m_PlayerActionsCallbackInterfaces)
|
|
UnregisterCallbacks(item);
|
|
m_Wrapper.m_PlayerActionsCallbackInterfaces.Clear();
|
|
AddCallbacks(instance);
|
|
}
|
|
}
|
|
public PlayerActions @Player => new PlayerActions(this);
|
|
public interface IPlayerActions
|
|
{
|
|
void OnClick(InputAction.CallbackContext context);
|
|
void OnMiddleClick(InputAction.CallbackContext context);
|
|
void OnRightClick(InputAction.CallbackContext context);
|
|
void OnPoint(InputAction.CallbackContext context);
|
|
void OnScroll(InputAction.CallbackContext context);
|
|
void OnDelta(InputAction.CallbackContext context);
|
|
}
|
|
}
|