mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-03-24 10:44:23 -05:00
133 lines
4.0 KiB
C#
133 lines
4.0 KiB
C#
// GENERATED AUTOMATICALLY FROM 'Assets/Scripts/PlayerScripts/MovementAbilities/GamePadControlls.inputactions'
|
|
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine.InputSystem;
|
|
using UnityEngine.InputSystem.Utilities;
|
|
|
|
public class @GamePadControlls : IInputActionCollection, IDisposable
|
|
{
|
|
public InputActionAsset asset { get; }
|
|
public @GamePadControlls()
|
|
{
|
|
asset = InputActionAsset.FromJson(@"{
|
|
""name"": ""GamePadControlls"",
|
|
""maps"": [
|
|
{
|
|
""name"": ""Runner"",
|
|
""id"": ""5b72a223-d8e7-4904-bda9-b7bc5bf92850"",
|
|
""actions"": [
|
|
{
|
|
""name"": ""Jump"",
|
|
""type"": ""Button"",
|
|
""id"": ""bd111e05-cd62-4634-ac88-eb948971f528"",
|
|
""expectedControlType"": ""Button"",
|
|
""processors"": """",
|
|
""interactions"": """"
|
|
}
|
|
],
|
|
""bindings"": [
|
|
{
|
|
""name"": """",
|
|
""id"": ""9fde690f-bb27-4b3c-a7e4-4354283ff9da"",
|
|
""path"": ""<Gamepad>/buttonSouth"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Jump"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
}
|
|
]
|
|
}
|
|
],
|
|
""controlSchemes"": []
|
|
}");
|
|
// Runner
|
|
m_Runner = asset.FindActionMap("Runner", throwIfNotFound: true);
|
|
m_Runner_Jump = m_Runner.FindAction("Jump", 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();
|
|
}
|
|
|
|
// Runner
|
|
private readonly InputActionMap m_Runner;
|
|
private IRunnerActions m_RunnerActionsCallbackInterface;
|
|
private readonly InputAction m_Runner_Jump;
|
|
public struct RunnerActions
|
|
{
|
|
private @GamePadControlls m_Wrapper;
|
|
public RunnerActions(@GamePadControlls wrapper) { m_Wrapper = wrapper; }
|
|
public InputAction @Jump => m_Wrapper.m_Runner_Jump;
|
|
public InputActionMap Get() { return m_Wrapper.m_Runner; }
|
|
public void Enable() { Get().Enable(); }
|
|
public void Disable() { Get().Disable(); }
|
|
public bool enabled => Get().enabled;
|
|
public static implicit operator InputActionMap(RunnerActions set) { return set.Get(); }
|
|
public void SetCallbacks(IRunnerActions instance)
|
|
{
|
|
if (m_Wrapper.m_RunnerActionsCallbackInterface != null)
|
|
{
|
|
@Jump.started -= m_Wrapper.m_RunnerActionsCallbackInterface.OnJump;
|
|
@Jump.performed -= m_Wrapper.m_RunnerActionsCallbackInterface.OnJump;
|
|
@Jump.canceled -= m_Wrapper.m_RunnerActionsCallbackInterface.OnJump;
|
|
}
|
|
m_Wrapper.m_RunnerActionsCallbackInterface = instance;
|
|
if (instance != null)
|
|
{
|
|
@Jump.started += instance.OnJump;
|
|
@Jump.performed += instance.OnJump;
|
|
@Jump.canceled += instance.OnJump;
|
|
}
|
|
}
|
|
}
|
|
public RunnerActions @Runner => new RunnerActions(this);
|
|
public interface IRunnerActions
|
|
{
|
|
void OnJump(InputAction.CallbackContext context);
|
|
}
|
|
}
|