390 lines
14 KiB
C#
390 lines
14 KiB
C#
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
|
|
// version 1.6.3
|
|
// from Assets/02.Scripts/BlueWater.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 @BlueWater: IInputActionCollection2, IDisposable
|
|
{
|
|
public InputActionAsset asset { get; }
|
|
public @BlueWater()
|
|
{
|
|
asset = InputActionAsset.FromJson(@"{
|
|
""name"": ""BlueWater"",
|
|
""maps"": [
|
|
{
|
|
""name"": ""Player"",
|
|
""id"": ""9fe03cc1-5cd3-4b79-a95e-461613cb242e"",
|
|
""actions"": [
|
|
{
|
|
""name"": ""Move"",
|
|
""type"": ""Value"",
|
|
""id"": ""e46165d9-8066-4400-8950-9b7d4bb9ca75"",
|
|
""expectedControlType"": ""Vector2"",
|
|
""processors"": """",
|
|
""interactions"": """",
|
|
""initialStateCheck"": true
|
|
},
|
|
{
|
|
""name"": ""AssaultMode"",
|
|
""type"": ""Button"",
|
|
""id"": ""7d9814fb-48e0-4717-91c3-0c7b7d99972c"",
|
|
""expectedControlType"": ""Button"",
|
|
""processors"": """",
|
|
""interactions"": """",
|
|
""initialStateCheck"": false
|
|
}
|
|
],
|
|
""bindings"": [
|
|
{
|
|
""name"": ""WASD"",
|
|
""id"": ""4dc5b54c-0e59-461e-a12d-470900925a36"",
|
|
""path"": ""2DVector"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Move"",
|
|
""isComposite"": true,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": ""up"",
|
|
""id"": ""07083b18-8b38-4c90-ae78-28c2927a5f82"",
|
|
""path"": ""<Keyboard>/w"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""Keyboard"",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""down"",
|
|
""id"": ""3b75699e-1063-4230-9ac3-95292c44d2bd"",
|
|
""path"": ""<Keyboard>/s"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""Keyboard"",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""left"",
|
|
""id"": ""6bdc290d-3bc8-4e00-b868-1977d3f2267d"",
|
|
""path"": ""<Keyboard>/a"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""Keyboard"",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""right"",
|
|
""id"": ""03206e08-b0b8-4a95-9bf8-a3e4fd10d4db"",
|
|
""path"": ""<Keyboard>/d"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""Keyboard"",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""8e9091c9-b649-4709-bae7-3ca464124529"",
|
|
""path"": ""<Keyboard>/v"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""Keyboard"",
|
|
""action"": ""AssaultMode"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
""name"": ""Camera"",
|
|
""id"": ""06b461c0-220a-44f8-a03e-0302537ffe0c"",
|
|
""actions"": [
|
|
{
|
|
""name"": ""Zoom"",
|
|
""type"": ""Value"",
|
|
""id"": ""26cdda4e-9797-43df-a511-7745f1de2567"",
|
|
""expectedControlType"": ""Axis"",
|
|
""processors"": """",
|
|
""interactions"": """",
|
|
""initialStateCheck"": true
|
|
},
|
|
{
|
|
""name"": ""Rotate"",
|
|
""type"": ""Button"",
|
|
""id"": ""d9db46b6-0228-4e7f-8b51-53cae3ccc330"",
|
|
""expectedControlType"": ""Button"",
|
|
""processors"": """",
|
|
""interactions"": """",
|
|
""initialStateCheck"": false
|
|
}
|
|
],
|
|
""bindings"": [
|
|
{
|
|
""name"": """",
|
|
""id"": ""6cbe83f3-bb32-4b85-9419-f88897bd4fc4"",
|
|
""path"": ""<Mouse>/scroll/y"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Zoom"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""e68715cb-964b-4648-9cef-3afefbe84441"",
|
|
""path"": ""<Mouse>/rightButton"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Rotate"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""4bc83c87-5345-4fb2-b39a-ac975f7bf47e"",
|
|
""path"": ""<Mouse>/leftButton"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Rotate"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
}
|
|
]
|
|
}
|
|
],
|
|
""controlSchemes"": [
|
|
{
|
|
""name"": ""Keyboard"",
|
|
""bindingGroup"": ""Keyboard"",
|
|
""devices"": [
|
|
{
|
|
""devicePath"": ""<Keyboard>"",
|
|
""isOptional"": false,
|
|
""isOR"": false
|
|
},
|
|
{
|
|
""devicePath"": ""<Mouse>"",
|
|
""isOptional"": false,
|
|
""isOR"": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}");
|
|
// Player
|
|
m_Player = asset.FindActionMap("Player", throwIfNotFound: true);
|
|
m_Player_Move = m_Player.FindAction("Move", throwIfNotFound: true);
|
|
m_Player_AssaultMode = m_Player.FindAction("AssaultMode", throwIfNotFound: true);
|
|
// Camera
|
|
m_Camera = asset.FindActionMap("Camera", throwIfNotFound: true);
|
|
m_Camera_Zoom = m_Camera.FindAction("Zoom", throwIfNotFound: true);
|
|
m_Camera_Rotate = m_Camera.FindAction("Rotate", 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 List<IPlayerActions> m_PlayerActionsCallbackInterfaces = new List<IPlayerActions>();
|
|
private readonly InputAction m_Player_Move;
|
|
private readonly InputAction m_Player_AssaultMode;
|
|
public struct PlayerActions
|
|
{
|
|
private @BlueWater m_Wrapper;
|
|
public PlayerActions(@BlueWater wrapper) { m_Wrapper = wrapper; }
|
|
public InputAction @Move => m_Wrapper.m_Player_Move;
|
|
public InputAction @AssaultMode => m_Wrapper.m_Player_AssaultMode;
|
|
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);
|
|
@Move.started += instance.OnMove;
|
|
@Move.performed += instance.OnMove;
|
|
@Move.canceled += instance.OnMove;
|
|
@AssaultMode.started += instance.OnAssaultMode;
|
|
@AssaultMode.performed += instance.OnAssaultMode;
|
|
@AssaultMode.canceled += instance.OnAssaultMode;
|
|
}
|
|
|
|
private void UnregisterCallbacks(IPlayerActions instance)
|
|
{
|
|
@Move.started -= instance.OnMove;
|
|
@Move.performed -= instance.OnMove;
|
|
@Move.canceled -= instance.OnMove;
|
|
@AssaultMode.started -= instance.OnAssaultMode;
|
|
@AssaultMode.performed -= instance.OnAssaultMode;
|
|
@AssaultMode.canceled -= instance.OnAssaultMode;
|
|
}
|
|
|
|
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_Zoom;
|
|
private readonly InputAction m_Camera_Rotate;
|
|
public struct CameraActions
|
|
{
|
|
private @BlueWater m_Wrapper;
|
|
public CameraActions(@BlueWater wrapper) { m_Wrapper = wrapper; }
|
|
public InputAction @Zoom => m_Wrapper.m_Camera_Zoom;
|
|
public InputAction @Rotate => m_Wrapper.m_Camera_Rotate;
|
|
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);
|
|
@Zoom.started += instance.OnZoom;
|
|
@Zoom.performed += instance.OnZoom;
|
|
@Zoom.canceled += instance.OnZoom;
|
|
@Rotate.started += instance.OnRotate;
|
|
@Rotate.performed += instance.OnRotate;
|
|
@Rotate.canceled += instance.OnRotate;
|
|
}
|
|
|
|
private void UnregisterCallbacks(ICameraActions instance)
|
|
{
|
|
@Zoom.started -= instance.OnZoom;
|
|
@Zoom.performed -= instance.OnZoom;
|
|
@Zoom.canceled -= instance.OnZoom;
|
|
@Rotate.started -= instance.OnRotate;
|
|
@Rotate.performed -= instance.OnRotate;
|
|
@Rotate.canceled -= instance.OnRotate;
|
|
}
|
|
|
|
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);
|
|
private int m_KeyboardSchemeIndex = -1;
|
|
public InputControlScheme KeyboardScheme
|
|
{
|
|
get
|
|
{
|
|
if (m_KeyboardSchemeIndex == -1) m_KeyboardSchemeIndex = asset.FindControlSchemeIndex("Keyboard");
|
|
return asset.controlSchemes[m_KeyboardSchemeIndex];
|
|
}
|
|
}
|
|
public interface IPlayerActions
|
|
{
|
|
void OnMove(InputAction.CallbackContext context);
|
|
void OnAssaultMode(InputAction.CallbackContext context);
|
|
}
|
|
public interface ICameraActions
|
|
{
|
|
void OnZoom(InputAction.CallbackContext context);
|
|
void OnRotate(InputAction.CallbackContext context);
|
|
}
|
|
}
|