Files
real-shooter/Assets/Actions/Shooting Actions.cs
2022-05-18 00:21:35 +07:00

153 lines
4.8 KiB
C#

//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.3.0
// from Assets/Actions/Shooting Actions.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 @ShootingActions : IInputActionCollection2, IDisposable
{
public InputActionAsset asset { get; }
public @ShootingActions()
{
asset = InputActionAsset.FromJson(@"{
""name"": ""Shooting Actions"",
""maps"": [
{
""name"": ""Player"",
""id"": ""8e751434-03c0-4291-810e-0cff9117839d"",
""actions"": [
{
""name"": ""Shoot"",
""type"": ""Button"",
""id"": ""bda4dcaf-c524-4b96-880c-afd5c4bb56a5"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
{
""name"": """",
""id"": ""e3651dc9-d777-415f-8f5c-0a184b5f0f91"",
""path"": ""<Mouse>/leftButton"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Shoot"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
}
],
""controlSchemes"": []
}");
// Player
m_Player = asset.FindActionMap("Player", throwIfNotFound: true);
m_Player_Shoot = m_Player.FindAction("Shoot", 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 IPlayerActions m_PlayerActionsCallbackInterface;
private readonly InputAction m_Player_Shoot;
public struct PlayerActions
{
private @ShootingActions m_Wrapper;
public PlayerActions(@ShootingActions wrapper) { m_Wrapper = wrapper; }
public InputAction @Shoot => m_Wrapper.m_Player_Shoot;
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 SetCallbacks(IPlayerActions instance)
{
if (m_Wrapper.m_PlayerActionsCallbackInterface != null)
{
@Shoot.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnShoot;
@Shoot.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnShoot;
@Shoot.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnShoot;
}
m_Wrapper.m_PlayerActionsCallbackInterface = instance;
if (instance != null)
{
@Shoot.started += instance.OnShoot;
@Shoot.performed += instance.OnShoot;
@Shoot.canceled += instance.OnShoot;
}
}
}
public PlayerActions @Player => new PlayerActions(this);
public interface IPlayerActions
{
void OnShoot(InputAction.CallbackContext context);
}
}