Files
SimUL/Assets/Scripts/Managers/InputSystem/InputActions.cs
T
2024-09-29 23:33:11 +03:00

514 lines
20 KiB
C#

//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.8.2
// from Assets/Scripts/Managers/InputSystem/InputActions.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 UnityEngine;
public partial class @InputActions: IInputActionCollection2, IDisposable
{
public InputActionAsset asset { get; }
public @InputActions()
{
asset = InputActionAsset.FromJson(@"{
""name"": ""InputActions"",
""maps"": [
{
""name"": ""Player"",
""id"": ""277864dc-d6c8-485b-860f-70382a4eaa1e"",
""actions"": [
{
""name"": ""PointClick"",
""type"": ""Button"",
""id"": ""fb720cef-8db9-45ea-94b8-34ee20907014"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
{
""name"": """",
""id"": ""105098b7-cb9c-4bea-a128-25fb122efd3d"",
""path"": ""<Mouse>/leftButton"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""PointClick"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""25a11c76-9acb-4544-bf8f-121962b3bf0b"",
""path"": ""<Gamepad>/buttonSouth"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""PointClick"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
},
{
""name"": ""Camera"",
""id"": ""9f9ddc51-3eac-495d-9e72-48577c8c8f4b"",
""actions"": [
{
""name"": ""Move"",
""type"": ""Value"",
""id"": ""42ed90e2-8e04-4002-a0a1-953fae8787ce"",
""expectedControlType"": ""Vector2"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": true
},
{
""name"": ""Rotate"",
""type"": ""Value"",
""id"": ""d269ae49-9dbe-4e7c-9a80-1276e29898d8"",
""expectedControlType"": ""Vector2"",
""processors"": """",
""interactions"": ""Hold"",
""initialStateCheck"": true
},
{
""name"": ""Zoom"",
""type"": ""Value"",
""id"": ""41d86dbc-39e0-4655-bc19-0eab9d5014a6"",
""expectedControlType"": ""Vector2"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": true
}
],
""bindings"": [
{
""name"": ""WASD"",
""id"": ""6a0891b5-2eec-48ad-850d-8f3d4589816b"",
""path"": ""2DVector"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""2e6af5dd-f093-4f51-8df7-996b3d0b7d8e"",
""path"": ""<Keyboard>/w"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""ef522e93-330b-4a04-8be5-9d719c461129"",
""path"": ""<Keyboard>/s"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""4785db1d-a198-4f1b-a4a3-15825b7301fd"",
""path"": ""<Keyboard>/a"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""8fdeb47b-06d1-4535-9742-01aacdd7d7a1"",
""path"": ""<Keyboard>/d"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""JoystickMovement"",
""id"": ""f9008d1f-75ee-4b4a-a98d-45206b88b557"",
""path"": ""2DVector"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""2162e77a-6f66-4396-9f4f-9b39efef2745"",
""path"": ""<Gamepad>/leftStick/up"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""da83e5f4-d2ed-4d99-ae7e-5f27f5e7406e"",
""path"": ""<Gamepad>/leftStick/down"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""267922e7-7a1e-471d-aad2-2346a6ad633c"",
""path"": ""<Gamepad>/leftStick/left"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""77cf4330-c504-4f80-81c7-33dd924ad7c7"",
""path"": ""<Gamepad>/leftStick/right"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""One Modifier"",
""id"": ""9e79ba5a-a365-470f-bd83-9f70fcf1ac4e"",
""path"": ""OneModifier"",
""interactions"": """",
""processors"": ""InvertVector2"",
""groups"": """",
""action"": ""Move"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""modifier"",
""id"": ""d894c4c2-d1c9-4a32-af41-c2c118c1debc"",
""path"": ""<Mouse>/rightButton"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""binding"",
""id"": ""b9a4dc3d-469f-435d-bf30-601363cbd4d2"",
""path"": ""<Mouse>/delta"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""One Modifier"",
""id"": ""921968f3-646e-4a34-ae14-f68c8034a225"",
""path"": ""OneModifier"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Rotate"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""modifier"",
""id"": ""36967647-01b0-4446-99ec-8467c5282970"",
""path"": ""<Mouse>/middleButton"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Rotate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""binding"",
""id"": ""23cd5caa-3052-46e5-b888-9b7097cffc1b"",
""path"": ""<Mouse>/delta"",
""interactions"": """",
""processors"": ""NormalizeVector2"",
""groups"": """",
""action"": ""Rotate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""2D Vector"",
""id"": ""1a1f22ab-5004-4133-844c-f3fd67792699"",
""path"": ""2DVector"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Rotate"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""left"",
""id"": ""70123c0f-2726-4ff5-9a04-83d845177032"",
""path"": ""<Keyboard>/e"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Rotate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""81380d14-07da-4e3e-b74d-13a4bc2edc1d"",
""path"": ""<Keyboard>/q"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Rotate"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": """",
""id"": ""8e2aefc6-bf10-4653-8782-6b92d5efc35a"",
""path"": ""<Mouse>/scroll"",
""interactions"": """",
""processors"": ""NormalizeVector2,InvertVector2(invertX=false)"",
""groups"": """",
""action"": ""Zoom"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
}
],
""controlSchemes"": []
}");
// Player
m_Player = asset.FindActionMap("Player", throwIfNotFound: true);
m_Player_PointClick = m_Player.FindAction("PointClick", throwIfNotFound: true);
// Camera
m_Camera = asset.FindActionMap("Camera", throwIfNotFound: true);
m_Camera_Move = m_Camera.FindAction("Move", throwIfNotFound: true);
m_Camera_Rotate = m_Camera.FindAction("Rotate", throwIfNotFound: true);
m_Camera_Zoom = m_Camera.FindAction("Zoom", throwIfNotFound: true);
}
~@InputActions()
{
Debug.Assert(!m_Player.enabled, "This will cause a leak and performance issues, InputActions.Player.Disable() has not been called.");
Debug.Assert(!m_Camera.enabled, "This will cause a leak and performance issues, InputActions.Camera.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_PointClick;
public struct PlayerActions
{
private @InputActions m_Wrapper;
public PlayerActions(@InputActions wrapper) { m_Wrapper = wrapper; }
public InputAction @PointClick => m_Wrapper.m_Player_PointClick;
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);
@PointClick.started += instance.OnPointClick;
@PointClick.performed += instance.OnPointClick;
@PointClick.canceled += instance.OnPointClick;
}
private void UnregisterCallbacks(IPlayerActions instance)
{
@PointClick.started -= instance.OnPointClick;
@PointClick.performed -= instance.OnPointClick;
@PointClick.canceled -= instance.OnPointClick;
}
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);
// Camera
private readonly InputActionMap m_Camera;
private List<ICameraActions> m_CameraActionsCallbackInterfaces = new List<ICameraActions>();
private readonly InputAction m_Camera_Move;
private readonly InputAction m_Camera_Rotate;
private readonly InputAction m_Camera_Zoom;
public struct CameraActions
{
private @InputActions m_Wrapper;
public CameraActions(@InputActions wrapper) { m_Wrapper = wrapper; }
public InputAction @Move => m_Wrapper.m_Camera_Move;
public InputAction @Rotate => m_Wrapper.m_Camera_Rotate;
public InputAction @Zoom => m_Wrapper.m_Camera_Zoom;
public InputActionMap Get() { return m_Wrapper.m_Camera; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(CameraActions set) { return set.Get(); }
public void AddCallbacks(ICameraActions instance)
{
if (instance == null || m_Wrapper.m_CameraActionsCallbackInterfaces.Contains(instance)) return;
m_Wrapper.m_CameraActionsCallbackInterfaces.Add(instance);
@Move.started += instance.OnMove;
@Move.performed += instance.OnMove;
@Move.canceled += instance.OnMove;
@Rotate.started += instance.OnRotate;
@Rotate.performed += instance.OnRotate;
@Rotate.canceled += instance.OnRotate;
@Zoom.started += instance.OnZoom;
@Zoom.performed += instance.OnZoom;
@Zoom.canceled += instance.OnZoom;
}
private void UnregisterCallbacks(ICameraActions instance)
{
@Move.started -= instance.OnMove;
@Move.performed -= instance.OnMove;
@Move.canceled -= instance.OnMove;
@Rotate.started -= instance.OnRotate;
@Rotate.performed -= instance.OnRotate;
@Rotate.canceled -= instance.OnRotate;
@Zoom.started -= instance.OnZoom;
@Zoom.performed -= instance.OnZoom;
@Zoom.canceled -= instance.OnZoom;
}
public void RemoveCallbacks(ICameraActions instance)
{
if (m_Wrapper.m_CameraActionsCallbackInterfaces.Remove(instance))
UnregisterCallbacks(instance);
}
public void SetCallbacks(ICameraActions instance)
{
foreach (var item in m_Wrapper.m_CameraActionsCallbackInterfaces)
UnregisterCallbacks(item);
m_Wrapper.m_CameraActionsCallbackInterfaces.Clear();
AddCallbacks(instance);
}
}
public CameraActions @Camera => new CameraActions(this);
public interface IPlayerActions
{
void OnPointClick(InputAction.CallbackContext context);
}
public interface ICameraActions
{
void OnMove(InputAction.CallbackContext context);
void OnRotate(InputAction.CallbackContext context);
void OnZoom(InputAction.CallbackContext context);
}
}