//------------------------------------------------------------------------------
//
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.14.0
// from Assets/Plugins/Pixel Crushers/Dialogue System/Demo/Scenes/New Input System/DemoInputControls.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Utilities;
///
/// Provides programmatic access to , , and instances defined in asset "Assets/Plugins/Pixel Crushers/Dialogue System/Demo/Scenes/New Input System/DemoInputControls.inputactions".
///
///
/// This class is source generated and any manual edits will be discarded if the associated asset is reimported or modified.
///
///
///
/// using namespace UnityEngine;
/// using UnityEngine.InputSystem;
///
/// // Example of using an InputActionMap named "Player" from a UnityEngine.MonoBehaviour implementing callback interface.
/// public class Example : MonoBehaviour, MyActions.IPlayerActions
/// {
/// private MyActions_Actions m_Actions; // Source code representation of asset.
/// private MyActions_Actions.PlayerActions m_Player; // Source code representation of action map.
///
/// void Awake()
/// {
/// m_Actions = new MyActions_Actions(); // Create asset object.
/// m_Player = m_Actions.Player; // Extract action map object.
/// m_Player.AddCallbacks(this); // Register callback interface IPlayerActions.
/// }
///
/// void OnDestroy()
/// {
/// m_Actions.Dispose(); // Destroy asset object.
/// }
///
/// void OnEnable()
/// {
/// m_Player.Enable(); // Enable all actions within map.
/// }
///
/// void OnDisable()
/// {
/// m_Player.Disable(); // Disable all actions within map.
/// }
///
/// #region Interface implementation of MyActions.IPlayerActions
///
/// // Invoked when "Move" action is either started, performed or canceled.
/// public void OnMove(InputAction.CallbackContext context)
/// {
/// Debug.Log($"OnMove: {context.ReadValue<Vector2>()}");
/// }
///
/// // Invoked when "Attack" action is either started, performed or canceled.
/// public void OnAttack(InputAction.CallbackContext context)
/// {
/// Debug.Log($"OnAttack: {context.ReadValue<float>()}");
/// }
///
/// #endregion
/// }
///
///
public partial class @DemoInputControls: IInputActionCollection2, IDisposable
{
///
/// Provides access to the underlying asset instance.
///
public InputActionAsset asset { get; }
///
/// Constructs a new instance.
///
public @DemoInputControls()
{
asset = InputActionAsset.FromJson(@"{
""name"": ""DemoInputControls"",
""maps"": [
{
""name"": ""DemoActionMap"",
""id"": ""41649a10-fe04-42dc-b834-7b0e6b8f6f8e"",
""actions"": [
{
""name"": ""Horizontal"",
""type"": ""Button"",
""id"": ""ef3929c6-b315-4851-8f3e-ae170992d312"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Vertical"",
""type"": ""Button"",
""id"": ""74bfe387-c2ec-4a2e-9b81-cd1c81ee069b"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Fire1"",
""type"": ""Button"",
""id"": ""804b48fe-6035-4b70-a3b4-877f04982d7d"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
{
""name"": ""A-D"",
""id"": ""988324e0-d947-4fa7-825f-8c22a3d5a9cd"",
""path"": ""1DAxis"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Horizontal"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""negative"",
""id"": ""096967ca-ee92-45be-9f93-fc5e3a4f109d"",
""path"": ""/a"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Horizontal"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""positive"",
""id"": ""fbfca6ac-a78f-40e1-b53a-27a6570672c4"",
""path"": ""/d"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Horizontal"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""Left-Right"",
""id"": ""80a8ea42-1404-4111-b927-3d3e018469dd"",
""path"": ""1DAxis"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Horizontal"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""negative"",
""id"": ""bd31e001-3b16-4b7e-865c-dc188bb61918"",
""path"": ""/leftArrow"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Horizontal"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""positive"",
""id"": ""98dc1df3-8219-4687-a480-47c71a1953df"",
""path"": ""/rightArrow"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Horizontal"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""S-W"",
""id"": ""5fe719fc-bbc5-4091-b418-91c9a8699b54"",
""path"": ""1DAxis"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Vertical"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""negative"",
""id"": ""5d7cca19-57a8-4a09-ab88-7dcac3570e64"",
""path"": ""/s"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Vertical"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""positive"",
""id"": ""6a6517d3-50c7-4c54-b86e-4dec04733436"",
""path"": ""/w"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Vertical"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""Down-Up"",
""id"": ""8ae87a3c-1197-4725-baf0-9be8746497fb"",
""path"": ""1DAxis"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Vertical"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""negative"",
""id"": ""5f943101-e079-4c5e-93f1-1602b61d2418"",
""path"": ""/downArrow"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Vertical"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""positive"",
""id"": ""8322cbd3-368e-43ed-b41e-f7ce51f1f189"",
""path"": ""/upArrow"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Vertical"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": """",
""id"": ""6de4a513-0301-4138-972a-db7bccc7e316"",
""path"": ""/space"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Fire1"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""e5a158a9-f419-43dc-912d-97f01d68c681"",
""path"": ""/leftButton"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Fire1"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
}
],
""controlSchemes"": []
}");
// DemoActionMap
m_DemoActionMap = asset.FindActionMap("DemoActionMap", throwIfNotFound: true);
m_DemoActionMap_Horizontal = m_DemoActionMap.FindAction("Horizontal", throwIfNotFound: true);
m_DemoActionMap_Vertical = m_DemoActionMap.FindAction("Vertical", throwIfNotFound: true);
m_DemoActionMap_Fire1 = m_DemoActionMap.FindAction("Fire1", throwIfNotFound: true);
}
~@DemoInputControls()
{
UnityEngine.Debug.Assert(!m_DemoActionMap.enabled, "This will cause a leak and performance issues, DemoInputControls.DemoActionMap.Disable() has not been called.");
}
///
/// Destroys this asset and all associated instances.
///
public void Dispose()
{
UnityEngine.Object.Destroy(asset);
}
///
public InputBinding? bindingMask
{
get => asset.bindingMask;
set => asset.bindingMask = value;
}
///
public ReadOnlyArray? devices
{
get => asset.devices;
set => asset.devices = value;
}
///
public ReadOnlyArray controlSchemes => asset.controlSchemes;
///
public bool Contains(InputAction action)
{
return asset.Contains(action);
}
///
public IEnumerator GetEnumerator()
{
return asset.GetEnumerator();
}
///
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
///
public void Enable()
{
asset.Enable();
}
///
public void Disable()
{
asset.Disable();
}
///
public IEnumerable 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);
}
// DemoActionMap
private readonly InputActionMap m_DemoActionMap;
private List m_DemoActionMapActionsCallbackInterfaces = new List();
private readonly InputAction m_DemoActionMap_Horizontal;
private readonly InputAction m_DemoActionMap_Vertical;
private readonly InputAction m_DemoActionMap_Fire1;
///
/// Provides access to input actions defined in input action map "DemoActionMap".
///
public struct DemoActionMapActions
{
private @DemoInputControls m_Wrapper;
///
/// Construct a new instance of the input action map wrapper class.
///
public DemoActionMapActions(@DemoInputControls wrapper) { m_Wrapper = wrapper; }
///
/// Provides access to the underlying input action "DemoActionMap/Horizontal".
///
public InputAction @Horizontal => m_Wrapper.m_DemoActionMap_Horizontal;
///
/// Provides access to the underlying input action "DemoActionMap/Vertical".
///
public InputAction @Vertical => m_Wrapper.m_DemoActionMap_Vertical;
///
/// Provides access to the underlying input action "DemoActionMap/Fire1".
///
public InputAction @Fire1 => m_Wrapper.m_DemoActionMap_Fire1;
///
/// Provides access to the underlying input action map instance.
///
public InputActionMap Get() { return m_Wrapper.m_DemoActionMap; }
///
public void Enable() { Get().Enable(); }
///
public void Disable() { Get().Disable(); }
///
public bool enabled => Get().enabled;
///
/// Implicitly converts an to an instance.
///
public static implicit operator InputActionMap(DemoActionMapActions set) { return set.Get(); }
///
/// Adds , and callbacks provided via on all input actions contained in this map.
///
/// Callback instance.
///
/// If is null or have already been added this method does nothing.
///
///
public void AddCallbacks(IDemoActionMapActions instance)
{
if (instance == null || m_Wrapper.m_DemoActionMapActionsCallbackInterfaces.Contains(instance)) return;
m_Wrapper.m_DemoActionMapActionsCallbackInterfaces.Add(instance);
@Horizontal.started += instance.OnHorizontal;
@Horizontal.performed += instance.OnHorizontal;
@Horizontal.canceled += instance.OnHorizontal;
@Vertical.started += instance.OnVertical;
@Vertical.performed += instance.OnVertical;
@Vertical.canceled += instance.OnVertical;
@Fire1.started += instance.OnFire1;
@Fire1.performed += instance.OnFire1;
@Fire1.canceled += instance.OnFire1;
}
///
/// Removes , and callbacks provided via on all input actions contained in this map.
///
///
/// Calling this method when have not previously been registered has no side-effects.
///
///
private void UnregisterCallbacks(IDemoActionMapActions instance)
{
@Horizontal.started -= instance.OnHorizontal;
@Horizontal.performed -= instance.OnHorizontal;
@Horizontal.canceled -= instance.OnHorizontal;
@Vertical.started -= instance.OnVertical;
@Vertical.performed -= instance.OnVertical;
@Vertical.canceled -= instance.OnVertical;
@Fire1.started -= instance.OnFire1;
@Fire1.performed -= instance.OnFire1;
@Fire1.canceled -= instance.OnFire1;
}
///
/// Unregisters and unregisters all input action callbacks via .
///
///
public void RemoveCallbacks(IDemoActionMapActions instance)
{
if (m_Wrapper.m_DemoActionMapActionsCallbackInterfaces.Remove(instance))
UnregisterCallbacks(instance);
}
///
/// Replaces all existing callback instances and previously registered input action callbacks associated with them with callbacks provided via .
///
///
/// If is null, calling this method will only unregister all existing callbacks but not register any new callbacks.
///
///
///
///
public void SetCallbacks(IDemoActionMapActions instance)
{
foreach (var item in m_Wrapper.m_DemoActionMapActionsCallbackInterfaces)
UnregisterCallbacks(item);
m_Wrapper.m_DemoActionMapActionsCallbackInterfaces.Clear();
AddCallbacks(instance);
}
}
///
/// Provides a new instance referencing this action map.
///
public DemoActionMapActions @DemoActionMap => new DemoActionMapActions(this);
///
/// Interface to implement callback methods for all input action callbacks associated with input actions defined by "DemoActionMap" which allows adding and removing callbacks.
///
///
///
public interface IDemoActionMapActions
{
///
/// Method invoked when associated input action "Horizontal" is either , or .
///
///
///
///
void OnHorizontal(InputAction.CallbackContext context);
///
/// Method invoked when associated input action "Vertical" is either , or .
///
///
///
///
void OnVertical(InputAction.CallbackContext context);
///
/// Method invoked when associated input action "Fire1" is either , or .
///
///
///
///
void OnFire1(InputAction.CallbackContext context);
}
}