608 lines
26 KiB
C#
608 lines
26 KiB
C#
|
// GENERATED AUTOMATICALLY FROM 'Assets/InputMaster.inputactions'
|
||
|
|
||
|
using System;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine.InputSystem;
|
||
|
using UnityEngine.InputSystem.Utilities;
|
||
|
|
||
|
public class @InputMaster : IInputActionCollection, IDisposable
|
||
|
{
|
||
|
public InputActionAsset asset { get; }
|
||
|
public @InputMaster()
|
||
|
{
|
||
|
asset = InputActionAsset.FromJson(@"{
|
||
|
""name"": ""InputMaster"",
|
||
|
""maps"": [
|
||
|
{
|
||
|
""name"": ""PyPlayer"",
|
||
|
""id"": ""d253f177-73a9-4236-91e2-1af7e2205de0"",
|
||
|
""actions"": [
|
||
|
{
|
||
|
""name"": ""Fly"",
|
||
|
""type"": ""Button"",
|
||
|
""id"": ""7965b5b0-31ca-4b32-8d58-7b9e8c294e6b"",
|
||
|
""expectedControlType"": ""Button"",
|
||
|
""processors"": """",
|
||
|
""interactions"": """"
|
||
|
},
|
||
|
{
|
||
|
""name"": ""TurnLeft"",
|
||
|
""type"": ""Button"",
|
||
|
""id"": ""a78cb156-5593-4e28-89ce-8320d7ef93ac"",
|
||
|
""expectedControlType"": ""Button"",
|
||
|
""processors"": """",
|
||
|
""interactions"": """"
|
||
|
},
|
||
|
{
|
||
|
""name"": ""TurnRight"",
|
||
|
""type"": ""Button"",
|
||
|
""id"": ""7dd7a181-f645-4308-b291-9edb09a7ed06"",
|
||
|
""expectedControlType"": ""Button"",
|
||
|
""processors"": """",
|
||
|
""interactions"": """"
|
||
|
},
|
||
|
{
|
||
|
""name"": ""Forward"",
|
||
|
""type"": ""Button"",
|
||
|
""id"": ""e89cb458-52e6-4d32-9c6a-8bff5d772900"",
|
||
|
""expectedControlType"": ""Button"",
|
||
|
""processors"": """",
|
||
|
""interactions"": """"
|
||
|
},
|
||
|
{
|
||
|
""name"": ""Movement"",
|
||
|
""type"": ""PassThrough"",
|
||
|
""id"": ""02218a41-9251-4831-b031-d2998bbbb5ed"",
|
||
|
""expectedControlType"": ""Vector2"",
|
||
|
""processors"": """",
|
||
|
""interactions"": """"
|
||
|
}
|
||
|
],
|
||
|
""bindings"": [
|
||
|
{
|
||
|
""name"": """",
|
||
|
""id"": ""db3fff07-e510-4766-81cd-1f65ab0490b8"",
|
||
|
""path"": ""<XInputController>/rightTrigger"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": ""Xbox Control Scheme"",
|
||
|
""action"": ""Fly"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": false
|
||
|
},
|
||
|
{
|
||
|
""name"": """",
|
||
|
""id"": ""87e15450-9741-4679-9130-94a5de80737a"",
|
||
|
""path"": ""<XInputController>/leftTrigger"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": ""Xbox Control Scheme"",
|
||
|
""action"": ""Fly"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": false
|
||
|
},
|
||
|
{
|
||
|
""name"": """",
|
||
|
""id"": ""495a6c48-456e-4c8a-b01c-152901c3cad7"",
|
||
|
""path"": ""<XInputController>/leftStick/left"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": ""Xbox Control Scheme"",
|
||
|
""action"": ""TurnLeft"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": false
|
||
|
},
|
||
|
{
|
||
|
""name"": """",
|
||
|
""id"": ""043c29f2-303f-4cb9-984d-e9b4b61640c7"",
|
||
|
""path"": ""<XInputController>/rightStick/left"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": ""Xbox Control Scheme"",
|
||
|
""action"": ""TurnLeft"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": false
|
||
|
},
|
||
|
{
|
||
|
""name"": """",
|
||
|
""id"": ""0c7e7d8d-e849-4a30-afb0-5b7257dfeae2"",
|
||
|
""path"": ""<XInputController>/leftStick/right"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": ""Xbox Control Scheme"",
|
||
|
""action"": ""TurnRight"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": false
|
||
|
},
|
||
|
{
|
||
|
""name"": """",
|
||
|
""id"": ""538bea35-db11-4366-a4f4-4e5ffb22a89e"",
|
||
|
""path"": ""<XInputController>/rightStick/right"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": ""Xbox Control Scheme"",
|
||
|
""action"": ""TurnRight"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": false
|
||
|
},
|
||
|
{
|
||
|
""name"": """",
|
||
|
""id"": ""663e71b9-1bea-4f52-ab42-329f033c99ce"",
|
||
|
""path"": ""<XInputController>/leftStick/up"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": ""Xbox Control Scheme"",
|
||
|
""action"": ""Forward"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": false
|
||
|
},
|
||
|
{
|
||
|
""name"": """",
|
||
|
""id"": ""2c7daeb3-e83c-4167-a340-37cabd18fd93"",
|
||
|
""path"": ""<XInputController>/rightStick/up"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": ""Xbox Control Scheme"",
|
||
|
""action"": ""Forward"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": false
|
||
|
},
|
||
|
{
|
||
|
""name"": ""2D Vector"",
|
||
|
""id"": ""8e6887e9-61a7-4de5-bec7-09e0aa97f116"",
|
||
|
""path"": ""2DVector"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": """",
|
||
|
""action"": ""Movement"",
|
||
|
""isComposite"": true,
|
||
|
""isPartOfComposite"": false
|
||
|
},
|
||
|
{
|
||
|
""name"": ""up"",
|
||
|
""id"": ""bcc5f22d-4b81-4e55-9234-090399d97ed5"",
|
||
|
""path"": ""<XInputController>/dpad/up"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": ""Xbox Control Scheme"",
|
||
|
""action"": ""Movement"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": true
|
||
|
},
|
||
|
{
|
||
|
""name"": ""down"",
|
||
|
""id"": ""d7f461ba-d0ef-4b77-8950-d31b15663ac9"",
|
||
|
""path"": ""<XInputController>/dpad/down"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": ""Xbox Control Scheme"",
|
||
|
""action"": ""Movement"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": true
|
||
|
},
|
||
|
{
|
||
|
""name"": ""left"",
|
||
|
""id"": ""05959c55-59a5-411a-b697-165134df113c"",
|
||
|
""path"": ""<XInputController>/dpad/left"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": ""Xbox Control Scheme"",
|
||
|
""action"": ""Movement"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": true
|
||
|
},
|
||
|
{
|
||
|
""name"": ""right"",
|
||
|
""id"": ""fb3da17a-84de-4e8a-8181-eb388a9c99cc"",
|
||
|
""path"": ""<XInputController>/dpad/right"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": ""Xbox Control Scheme"",
|
||
|
""action"": ""Movement"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": true
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
""name"": ""Butterfly"",
|
||
|
""id"": ""88d6140d-4962-407d-8143-b7b99165202a"",
|
||
|
""actions"": [
|
||
|
{
|
||
|
""name"": ""Fly"",
|
||
|
""type"": ""Button"",
|
||
|
""id"": ""39d58394-6c9f-4dbd-92e6-0c493b309b58"",
|
||
|
""expectedControlType"": ""Button"",
|
||
|
""processors"": """",
|
||
|
""interactions"": """"
|
||
|
},
|
||
|
{
|
||
|
""name"": ""Forward"",
|
||
|
""type"": ""Button"",
|
||
|
""id"": ""f318c574-2105-438a-bd3a-8b2067ec9cf7"",
|
||
|
""expectedControlType"": ""Button"",
|
||
|
""processors"": """",
|
||
|
""interactions"": """"
|
||
|
},
|
||
|
{
|
||
|
""name"": ""Move"",
|
||
|
""type"": ""Value"",
|
||
|
""id"": ""cc933cea-bb98-4d79-bed8-ff83532db319"",
|
||
|
""expectedControlType"": """",
|
||
|
""processors"": """",
|
||
|
""interactions"": """"
|
||
|
},
|
||
|
{
|
||
|
""name"": ""Rotation"",
|
||
|
""type"": ""Value"",
|
||
|
""id"": ""75fa7dca-31ae-42ce-9229-78ebfbdf6a3b"",
|
||
|
""expectedControlType"": """",
|
||
|
""processors"": """",
|
||
|
""interactions"": """"
|
||
|
}
|
||
|
],
|
||
|
""bindings"": [
|
||
|
{
|
||
|
""name"": """",
|
||
|
""id"": ""207e8dae-e8f5-4e41-9b82-5ad03e0fe415"",
|
||
|
""path"": ""<XInputController>/rightTrigger"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": ""Xbox Control Scheme"",
|
||
|
""action"": ""Fly"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": false
|
||
|
},
|
||
|
{
|
||
|
""name"": """",
|
||
|
""id"": ""7add4d3c-ee60-4a69-81fd-a056e9c0b387"",
|
||
|
""path"": ""<XInputController>/leftTrigger"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": ""Xbox Control Scheme"",
|
||
|
""action"": ""Forward"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": false
|
||
|
},
|
||
|
{
|
||
|
""name"": """",
|
||
|
""id"": ""c4119b1d-1ef6-4464-9096-53b1ac2bc355"",
|
||
|
""path"": ""<XInputController>/leftStick"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": ""Xbox Control Scheme"",
|
||
|
""action"": ""Move"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": false
|
||
|
},
|
||
|
{
|
||
|
""name"": """",
|
||
|
""id"": ""4ee6bac0-7fa1-4376-946f-9ccf70fc9cee"",
|
||
|
""path"": ""<XInputController>/rightStick"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": ""Xbox Control Scheme"",
|
||
|
""action"": ""Rotation"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": false
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
""name"": ""MicroSub"",
|
||
|
""id"": ""1c9f72b5-4c39-4a50-bdf9-022deb39c818"",
|
||
|
""actions"": [
|
||
|
{
|
||
|
""name"": ""Move"",
|
||
|
""type"": ""Value"",
|
||
|
""id"": ""0db27ba1-9ba9-4525-a47d-2142734e6de2"",
|
||
|
""expectedControlType"": """",
|
||
|
""processors"": """",
|
||
|
""interactions"": """"
|
||
|
},
|
||
|
{
|
||
|
""name"": ""Rotate"",
|
||
|
""type"": ""Value"",
|
||
|
""id"": ""11876236-52d9-4e21-a382-7185e8455b18"",
|
||
|
""expectedControlType"": """",
|
||
|
""processors"": """",
|
||
|
""interactions"": """"
|
||
|
}
|
||
|
],
|
||
|
""bindings"": [
|
||
|
{
|
||
|
""name"": """",
|
||
|
""id"": ""70061b1f-e611-4fa2-b22c-1cff93c69331"",
|
||
|
""path"": ""<Gamepad>/leftStick"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": ""Xbox Control Scheme"",
|
||
|
""action"": ""Move"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": false
|
||
|
},
|
||
|
{
|
||
|
""name"": """",
|
||
|
""id"": ""500d7645-372b-4ae3-a1e6-15fe600b7962"",
|
||
|
""path"": ""<Gamepad>/rightStick"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": ""Xbox Control Scheme"",
|
||
|
""action"": ""Rotate"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": false
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
""controlSchemes"": [
|
||
|
{
|
||
|
""name"": ""Xbox Control Scheme"",
|
||
|
""bindingGroup"": ""Xbox Control Scheme"",
|
||
|
""devices"": [
|
||
|
{
|
||
|
""devicePath"": ""<XInputController>"",
|
||
|
""isOptional"": false,
|
||
|
""isOR"": false
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}");
|
||
|
// PyPlayer
|
||
|
m_PyPlayer = asset.FindActionMap("PyPlayer", throwIfNotFound: true);
|
||
|
m_PyPlayer_Fly = m_PyPlayer.FindAction("Fly", throwIfNotFound: true);
|
||
|
m_PyPlayer_TurnLeft = m_PyPlayer.FindAction("TurnLeft", throwIfNotFound: true);
|
||
|
m_PyPlayer_TurnRight = m_PyPlayer.FindAction("TurnRight", throwIfNotFound: true);
|
||
|
m_PyPlayer_Forward = m_PyPlayer.FindAction("Forward", throwIfNotFound: true);
|
||
|
m_PyPlayer_Movement = m_PyPlayer.FindAction("Movement", throwIfNotFound: true);
|
||
|
// Butterfly
|
||
|
m_Butterfly = asset.FindActionMap("Butterfly", throwIfNotFound: true);
|
||
|
m_Butterfly_Fly = m_Butterfly.FindAction("Fly", throwIfNotFound: true);
|
||
|
m_Butterfly_Forward = m_Butterfly.FindAction("Forward", throwIfNotFound: true);
|
||
|
m_Butterfly_Move = m_Butterfly.FindAction("Move", throwIfNotFound: true);
|
||
|
m_Butterfly_Rotation = m_Butterfly.FindAction("Rotation", throwIfNotFound: true);
|
||
|
// MicroSub
|
||
|
m_MicroSub = asset.FindActionMap("MicroSub", throwIfNotFound: true);
|
||
|
m_MicroSub_Move = m_MicroSub.FindAction("Move", throwIfNotFound: true);
|
||
|
m_MicroSub_Rotate = m_MicroSub.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();
|
||
|
}
|
||
|
|
||
|
// PyPlayer
|
||
|
private readonly InputActionMap m_PyPlayer;
|
||
|
private IPyPlayerActions m_PyPlayerActionsCallbackInterface;
|
||
|
private readonly InputAction m_PyPlayer_Fly;
|
||
|
private readonly InputAction m_PyPlayer_TurnLeft;
|
||
|
private readonly InputAction m_PyPlayer_TurnRight;
|
||
|
private readonly InputAction m_PyPlayer_Forward;
|
||
|
private readonly InputAction m_PyPlayer_Movement;
|
||
|
public struct PyPlayerActions
|
||
|
{
|
||
|
private @InputMaster m_Wrapper;
|
||
|
public PyPlayerActions(@InputMaster wrapper) { m_Wrapper = wrapper; }
|
||
|
public InputAction @Fly => m_Wrapper.m_PyPlayer_Fly;
|
||
|
public InputAction @TurnLeft => m_Wrapper.m_PyPlayer_TurnLeft;
|
||
|
public InputAction @TurnRight => m_Wrapper.m_PyPlayer_TurnRight;
|
||
|
public InputAction @Forward => m_Wrapper.m_PyPlayer_Forward;
|
||
|
public InputAction @Movement => m_Wrapper.m_PyPlayer_Movement;
|
||
|
public InputActionMap Get() { return m_Wrapper.m_PyPlayer; }
|
||
|
public void Enable() { Get().Enable(); }
|
||
|
public void Disable() { Get().Disable(); }
|
||
|
public bool enabled => Get().enabled;
|
||
|
public static implicit operator InputActionMap(PyPlayerActions set) { return set.Get(); }
|
||
|
public void SetCallbacks(IPyPlayerActions instance)
|
||
|
{
|
||
|
if (m_Wrapper.m_PyPlayerActionsCallbackInterface != null)
|
||
|
{
|
||
|
@Fly.started -= m_Wrapper.m_PyPlayerActionsCallbackInterface.OnFly;
|
||
|
@Fly.performed -= m_Wrapper.m_PyPlayerActionsCallbackInterface.OnFly;
|
||
|
@Fly.canceled -= m_Wrapper.m_PyPlayerActionsCallbackInterface.OnFly;
|
||
|
@TurnLeft.started -= m_Wrapper.m_PyPlayerActionsCallbackInterface.OnTurnLeft;
|
||
|
@TurnLeft.performed -= m_Wrapper.m_PyPlayerActionsCallbackInterface.OnTurnLeft;
|
||
|
@TurnLeft.canceled -= m_Wrapper.m_PyPlayerActionsCallbackInterface.OnTurnLeft;
|
||
|
@TurnRight.started -= m_Wrapper.m_PyPlayerActionsCallbackInterface.OnTurnRight;
|
||
|
@TurnRight.performed -= m_Wrapper.m_PyPlayerActionsCallbackInterface.OnTurnRight;
|
||
|
@TurnRight.canceled -= m_Wrapper.m_PyPlayerActionsCallbackInterface.OnTurnRight;
|
||
|
@Forward.started -= m_Wrapper.m_PyPlayerActionsCallbackInterface.OnForward;
|
||
|
@Forward.performed -= m_Wrapper.m_PyPlayerActionsCallbackInterface.OnForward;
|
||
|
@Forward.canceled -= m_Wrapper.m_PyPlayerActionsCallbackInterface.OnForward;
|
||
|
@Movement.started -= m_Wrapper.m_PyPlayerActionsCallbackInterface.OnMovement;
|
||
|
@Movement.performed -= m_Wrapper.m_PyPlayerActionsCallbackInterface.OnMovement;
|
||
|
@Movement.canceled -= m_Wrapper.m_PyPlayerActionsCallbackInterface.OnMovement;
|
||
|
}
|
||
|
m_Wrapper.m_PyPlayerActionsCallbackInterface = instance;
|
||
|
if (instance != null)
|
||
|
{
|
||
|
@Fly.started += instance.OnFly;
|
||
|
@Fly.performed += instance.OnFly;
|
||
|
@Fly.canceled += instance.OnFly;
|
||
|
@TurnLeft.started += instance.OnTurnLeft;
|
||
|
@TurnLeft.performed += instance.OnTurnLeft;
|
||
|
@TurnLeft.canceled += instance.OnTurnLeft;
|
||
|
@TurnRight.started += instance.OnTurnRight;
|
||
|
@TurnRight.performed += instance.OnTurnRight;
|
||
|
@TurnRight.canceled += instance.OnTurnRight;
|
||
|
@Forward.started += instance.OnForward;
|
||
|
@Forward.performed += instance.OnForward;
|
||
|
@Forward.canceled += instance.OnForward;
|
||
|
@Movement.started += instance.OnMovement;
|
||
|
@Movement.performed += instance.OnMovement;
|
||
|
@Movement.canceled += instance.OnMovement;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public PyPlayerActions @PyPlayer => new PyPlayerActions(this);
|
||
|
|
||
|
// Butterfly
|
||
|
private readonly InputActionMap m_Butterfly;
|
||
|
private IButterflyActions m_ButterflyActionsCallbackInterface;
|
||
|
private readonly InputAction m_Butterfly_Fly;
|
||
|
private readonly InputAction m_Butterfly_Forward;
|
||
|
private readonly InputAction m_Butterfly_Move;
|
||
|
private readonly InputAction m_Butterfly_Rotation;
|
||
|
public struct ButterflyActions
|
||
|
{
|
||
|
private @InputMaster m_Wrapper;
|
||
|
public ButterflyActions(@InputMaster wrapper) { m_Wrapper = wrapper; }
|
||
|
public InputAction @Fly => m_Wrapper.m_Butterfly_Fly;
|
||
|
public InputAction @Forward => m_Wrapper.m_Butterfly_Forward;
|
||
|
public InputAction @Move => m_Wrapper.m_Butterfly_Move;
|
||
|
public InputAction @Rotation => m_Wrapper.m_Butterfly_Rotation;
|
||
|
public InputActionMap Get() { return m_Wrapper.m_Butterfly; }
|
||
|
public void Enable() { Get().Enable(); }
|
||
|
public void Disable() { Get().Disable(); }
|
||
|
public bool enabled => Get().enabled;
|
||
|
public static implicit operator InputActionMap(ButterflyActions set) { return set.Get(); }
|
||
|
public void SetCallbacks(IButterflyActions instance)
|
||
|
{
|
||
|
if (m_Wrapper.m_ButterflyActionsCallbackInterface != null)
|
||
|
{
|
||
|
@Fly.started -= m_Wrapper.m_ButterflyActionsCallbackInterface.OnFly;
|
||
|
@Fly.performed -= m_Wrapper.m_ButterflyActionsCallbackInterface.OnFly;
|
||
|
@Fly.canceled -= m_Wrapper.m_ButterflyActionsCallbackInterface.OnFly;
|
||
|
@Forward.started -= m_Wrapper.m_ButterflyActionsCallbackInterface.OnForward;
|
||
|
@Forward.performed -= m_Wrapper.m_ButterflyActionsCallbackInterface.OnForward;
|
||
|
@Forward.canceled -= m_Wrapper.m_ButterflyActionsCallbackInterface.OnForward;
|
||
|
@Move.started -= m_Wrapper.m_ButterflyActionsCallbackInterface.OnMove;
|
||
|
@Move.performed -= m_Wrapper.m_ButterflyActionsCallbackInterface.OnMove;
|
||
|
@Move.canceled -= m_Wrapper.m_ButterflyActionsCallbackInterface.OnMove;
|
||
|
@Rotation.started -= m_Wrapper.m_ButterflyActionsCallbackInterface.OnRotation;
|
||
|
@Rotation.performed -= m_Wrapper.m_ButterflyActionsCallbackInterface.OnRotation;
|
||
|
@Rotation.canceled -= m_Wrapper.m_ButterflyActionsCallbackInterface.OnRotation;
|
||
|
}
|
||
|
m_Wrapper.m_ButterflyActionsCallbackInterface = instance;
|
||
|
if (instance != null)
|
||
|
{
|
||
|
@Fly.started += instance.OnFly;
|
||
|
@Fly.performed += instance.OnFly;
|
||
|
@Fly.canceled += instance.OnFly;
|
||
|
@Forward.started += instance.OnForward;
|
||
|
@Forward.performed += instance.OnForward;
|
||
|
@Forward.canceled += instance.OnForward;
|
||
|
@Move.started += instance.OnMove;
|
||
|
@Move.performed += instance.OnMove;
|
||
|
@Move.canceled += instance.OnMove;
|
||
|
@Rotation.started += instance.OnRotation;
|
||
|
@Rotation.performed += instance.OnRotation;
|
||
|
@Rotation.canceled += instance.OnRotation;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public ButterflyActions @Butterfly => new ButterflyActions(this);
|
||
|
|
||
|
// MicroSub
|
||
|
private readonly InputActionMap m_MicroSub;
|
||
|
private IMicroSubActions m_MicroSubActionsCallbackInterface;
|
||
|
private readonly InputAction m_MicroSub_Move;
|
||
|
private readonly InputAction m_MicroSub_Rotate;
|
||
|
public struct MicroSubActions
|
||
|
{
|
||
|
private @InputMaster m_Wrapper;
|
||
|
public MicroSubActions(@InputMaster wrapper) { m_Wrapper = wrapper; }
|
||
|
public InputAction @Move => m_Wrapper.m_MicroSub_Move;
|
||
|
public InputAction @Rotate => m_Wrapper.m_MicroSub_Rotate;
|
||
|
public InputActionMap Get() { return m_Wrapper.m_MicroSub; }
|
||
|
public void Enable() { Get().Enable(); }
|
||
|
public void Disable() { Get().Disable(); }
|
||
|
public bool enabled => Get().enabled;
|
||
|
public static implicit operator InputActionMap(MicroSubActions set) { return set.Get(); }
|
||
|
public void SetCallbacks(IMicroSubActions instance)
|
||
|
{
|
||
|
if (m_Wrapper.m_MicroSubActionsCallbackInterface != null)
|
||
|
{
|
||
|
@Move.started -= m_Wrapper.m_MicroSubActionsCallbackInterface.OnMove;
|
||
|
@Move.performed -= m_Wrapper.m_MicroSubActionsCallbackInterface.OnMove;
|
||
|
@Move.canceled -= m_Wrapper.m_MicroSubActionsCallbackInterface.OnMove;
|
||
|
@Rotate.started -= m_Wrapper.m_MicroSubActionsCallbackInterface.OnRotate;
|
||
|
@Rotate.performed -= m_Wrapper.m_MicroSubActionsCallbackInterface.OnRotate;
|
||
|
@Rotate.canceled -= m_Wrapper.m_MicroSubActionsCallbackInterface.OnRotate;
|
||
|
}
|
||
|
m_Wrapper.m_MicroSubActionsCallbackInterface = instance;
|
||
|
if (instance != null)
|
||
|
{
|
||
|
@Move.started += instance.OnMove;
|
||
|
@Move.performed += instance.OnMove;
|
||
|
@Move.canceled += instance.OnMove;
|
||
|
@Rotate.started += instance.OnRotate;
|
||
|
@Rotate.performed += instance.OnRotate;
|
||
|
@Rotate.canceled += instance.OnRotate;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public MicroSubActions @MicroSub => new MicroSubActions(this);
|
||
|
private int m_XboxControlSchemeSchemeIndex = -1;
|
||
|
public InputControlScheme XboxControlSchemeScheme
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
if (m_XboxControlSchemeSchemeIndex == -1) m_XboxControlSchemeSchemeIndex = asset.FindControlSchemeIndex("Xbox Control Scheme");
|
||
|
return asset.controlSchemes[m_XboxControlSchemeSchemeIndex];
|
||
|
}
|
||
|
}
|
||
|
public interface IPyPlayerActions
|
||
|
{
|
||
|
void OnFly(InputAction.CallbackContext context);
|
||
|
void OnTurnLeft(InputAction.CallbackContext context);
|
||
|
void OnTurnRight(InputAction.CallbackContext context);
|
||
|
void OnForward(InputAction.CallbackContext context);
|
||
|
void OnMovement(InputAction.CallbackContext context);
|
||
|
}
|
||
|
public interface IButterflyActions
|
||
|
{
|
||
|
void OnFly(InputAction.CallbackContext context);
|
||
|
void OnForward(InputAction.CallbackContext context);
|
||
|
void OnMove(InputAction.CallbackContext context);
|
||
|
void OnRotation(InputAction.CallbackContext context);
|
||
|
}
|
||
|
public interface IMicroSubActions
|
||
|
{
|
||
|
void OnMove(InputAction.CallbackContext context);
|
||
|
void OnRotate(InputAction.CallbackContext context);
|
||
|
}
|
||
|
}
|