您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
597 行
25 KiB
597 行
25 KiB
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
|
|
// version 1.1.0
|
|
// from Assets/ML-Agents/Examples/Dodgeball/Input/FPSPlayerInputActions.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 @FPSPlayerInputActions : IInputActionCollection2, IDisposable
|
|
{
|
|
public InputActionAsset asset { get; }
|
|
public @FPSPlayerInputActions()
|
|
{
|
|
asset = InputActionAsset.FromJson(@"{
|
|
""name"": ""FPSPlayerInputActions"",
|
|
""maps"": [
|
|
{
|
|
""name"": ""Player"",
|
|
""id"": ""bb797917-97ca-47e1-b3c9-0572380e9376"",
|
|
""actions"": [
|
|
{
|
|
""name"": ""Walk"",
|
|
""type"": ""Value"",
|
|
""id"": ""2f9ecc77-85d9-4189-8faf-18dcf905d2d4"",
|
|
""expectedControlType"": ""Vector2"",
|
|
""processors"": """",
|
|
""interactions"": """"
|
|
},
|
|
{
|
|
""name"": ""Jump"",
|
|
""type"": ""Button"",
|
|
""id"": ""d2faa0a0-e027-4a5d-a155-870bb0ceaf7c"",
|
|
""expectedControlType"": ""Button"",
|
|
""processors"": """",
|
|
""interactions"": """"
|
|
},
|
|
{
|
|
""name"": ""Shoot"",
|
|
""type"": ""Button"",
|
|
""id"": ""cbcb2a57-a474-46a7-b133-cf144f6de321"",
|
|
""expectedControlType"": ""Button"",
|
|
""processors"": """",
|
|
""interactions"": """"
|
|
},
|
|
{
|
|
""name"": ""Shield"",
|
|
""type"": ""Button"",
|
|
""id"": ""ec97db61-8659-49c6-afaa-20b82a98e72b"",
|
|
""expectedControlType"": ""Button"",
|
|
""processors"": """",
|
|
""interactions"": """"
|
|
},
|
|
{
|
|
""name"": ""Dash"",
|
|
""type"": ""Button"",
|
|
""id"": ""49d5245a-a350-4f94-b4c8-cf578d61000b"",
|
|
""expectedControlType"": ""Button"",
|
|
""processors"": """",
|
|
""interactions"": """"
|
|
},
|
|
{
|
|
""name"": ""RotateOld"",
|
|
""type"": ""Value"",
|
|
""id"": ""b309ca48-95aa-4032-bd7d-46dcaeb138d0"",
|
|
""expectedControlType"": ""Axis"",
|
|
""processors"": """",
|
|
""interactions"": """"
|
|
},
|
|
{
|
|
""name"": ""Rotate"",
|
|
""type"": ""Value"",
|
|
""id"": ""7172bb7c-a5ae-46b9-af48-2f521eb69773"",
|
|
""expectedControlType"": ""Vector2"",
|
|
""processors"": """",
|
|
""interactions"": """"
|
|
}
|
|
],
|
|
""bindings"": [
|
|
{
|
|
""name"": ""2D Vector"",
|
|
""id"": ""f7a4010c-91c6-422f-91e7-4b14cbdb214a"",
|
|
""path"": ""2DVector(mode=2)"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Walk"",
|
|
""isComposite"": true,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": ""up"",
|
|
""id"": ""0067bacb-5284-4358-8fbf-cbbd17bd4884"",
|
|
""path"": ""<Keyboard>/w"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Walk"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""down"",
|
|
""id"": ""5e100fc2-94e3-4f73-8020-b6cbeed41b97"",
|
|
""path"": ""<Keyboard>/s"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Walk"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""left"",
|
|
""id"": ""5eb9d69e-8df8-443c-93f4-447eeb52b75f"",
|
|
""path"": ""<Keyboard>/a"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Walk"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""right"",
|
|
""id"": ""3b4de59c-d93c-4072-b11e-711ea8534593"",
|
|
""path"": ""<Keyboard>/d"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Walk"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""6fdb596c-c0bb-4f37-b409-c235e9612acf"",
|
|
""path"": ""<Gamepad>/leftStick"",
|
|
""interactions"": """",
|
|
""processors"": ""StickDeadzone"",
|
|
""groups"": """",
|
|
""action"": ""Walk"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""28ddf0bd-ea22-4069-ba60-ca41d4742bf9"",
|
|
""path"": ""<Gamepad>/buttonSouth"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Jump"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""6f4a5988-5e01-4c66-a3ab-f4b5e47bd21f"",
|
|
""path"": ""<Keyboard>/j"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Jump"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""fe641861-0da7-43ba-8bd6-e95a17232a77"",
|
|
""path"": ""<Gamepad>/rightTrigger"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Shoot"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""2ae82452-d746-4a28-86f4-43c469c78eff"",
|
|
""path"": ""<Keyboard>/k"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Shoot"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""f3b10de9-a5c7-4952-b617-d46c6132d174"",
|
|
""path"": ""<Mouse>/leftButton"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Shoot"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""2b94ae52-9bb0-478e-8e4c-bf6c747a5c7d"",
|
|
""path"": ""<Gamepad>/rightShoulder"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Shield"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""75b3d327-54da-4b56-a39e-052b1c173b56"",
|
|
""path"": ""<Keyboard>/i"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Shield"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""319796b1-6071-46f0-81dc-58b6bdb7d86a"",
|
|
""path"": ""<Gamepad>/leftTrigger"",
|
|
""interactions"": ""Press(pressPoint=0.5)"",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Dash"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""ae8dc5a5-930d-412e-a196-627e63bfcd0c"",
|
|
""path"": ""<Keyboard>/l"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Dash"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""3eaa9db8-9821-49ea-b640-0434a871fb19"",
|
|
""path"": ""<Mouse>/rightButton"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Dash"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""ac165f0a-fa27-4311-b148-2689537b942b"",
|
|
""path"": ""<Pointer>/delta/x"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""RotateOld"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": ""1D Axis"",
|
|
""id"": ""a788bd05-d81e-47f4-a14c-5cb071e21c96"",
|
|
""path"": ""1DAxis"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""RotateOld"",
|
|
""isComposite"": true,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": ""negative"",
|
|
""id"": ""9844ff0b-6a74-43bb-a969-9f59c74212b9"",
|
|
""path"": ""<Gamepad>/rightStick/left"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""RotateOld"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""positive"",
|
|
""id"": ""b81e038b-8786-4bbe-bb1d-aba1d54112d1"",
|
|
""path"": ""<Gamepad>/rightStick/right"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""RotateOld"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""4e9015a8-9ef1-4f5b-8776-ed1f246ce741"",
|
|
""path"": ""<Pointer>/delta"",
|
|
""interactions"": """",
|
|
""processors"": ""ScaleVector2(x=2,y=2)"",
|
|
""groups"": """",
|
|
""action"": ""Rotate"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
""name"": ""UI"",
|
|
""id"": ""ab1a83a2-e1a9-44f3-8688-7a60542bcf25"",
|
|
""actions"": [
|
|
{
|
|
""name"": ""Controls"",
|
|
""type"": ""Button"",
|
|
""id"": ""bd885a35-fff9-4afb-a855-24fb9f6006c7"",
|
|
""expectedControlType"": ""Button"",
|
|
""processors"": """",
|
|
""interactions"": """"
|
|
},
|
|
{
|
|
""name"": ""Restart"",
|
|
""type"": ""Button"",
|
|
""id"": ""e94117bb-34b9-400e-98a4-5bcdc0e1ef18"",
|
|
""expectedControlType"": ""Button"",
|
|
""processors"": """",
|
|
""interactions"": """"
|
|
}
|
|
],
|
|
""bindings"": [
|
|
{
|
|
""name"": """",
|
|
""id"": ""b1df5ed6-1b89-4092-8140-92b0835f0a58"",
|
|
""path"": ""<Keyboard>/c"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Controls"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""8f5dc820-dac4-4667-92d5-e1f46b8e3365"",
|
|
""path"": ""<Gamepad>/select"",
|
|
""interactions"": ""Press"",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Controls"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""3558b9e6-24b3-420a-95a3-0bfd03222ba6"",
|
|
""path"": ""<Keyboard>/r"",
|
|
""interactions"": ""Press"",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Restart"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""b3ee58f5-8a7d-40c9-abc6-6694d289683d"",
|
|
""path"": ""<Gamepad>/buttonNorth"",
|
|
""interactions"": ""Press"",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Restart"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
}
|
|
]
|
|
}
|
|
],
|
|
""controlSchemes"": []
|
|
}");
|
|
// Player
|
|
m_Player = asset.FindActionMap("Player", throwIfNotFound: true);
|
|
m_Player_Walk = m_Player.FindAction("Walk", throwIfNotFound: true);
|
|
m_Player_Jump = m_Player.FindAction("Jump", throwIfNotFound: true);
|
|
m_Player_Shoot = m_Player.FindAction("Shoot", throwIfNotFound: true);
|
|
m_Player_Shield = m_Player.FindAction("Shield", throwIfNotFound: true);
|
|
m_Player_Dash = m_Player.FindAction("Dash", throwIfNotFound: true);
|
|
m_Player_RotateOld = m_Player.FindAction("RotateOld", throwIfNotFound: true);
|
|
m_Player_Rotate = m_Player.FindAction("Rotate", throwIfNotFound: true);
|
|
// UI
|
|
m_UI = asset.FindActionMap("UI", throwIfNotFound: true);
|
|
m_UI_Controls = m_UI.FindAction("Controls", throwIfNotFound: true);
|
|
m_UI_Restart = m_UI.FindAction("Restart", 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_Walk;
|
|
private readonly InputAction m_Player_Jump;
|
|
private readonly InputAction m_Player_Shoot;
|
|
private readonly InputAction m_Player_Shield;
|
|
private readonly InputAction m_Player_Dash;
|
|
private readonly InputAction m_Player_RotateOld;
|
|
private readonly InputAction m_Player_Rotate;
|
|
public struct PlayerActions
|
|
{
|
|
private @FPSPlayerInputActions m_Wrapper;
|
|
public PlayerActions(@FPSPlayerInputActions wrapper) { m_Wrapper = wrapper; }
|
|
public InputAction @Walk => m_Wrapper.m_Player_Walk;
|
|
public InputAction @Jump => m_Wrapper.m_Player_Jump;
|
|
public InputAction @Shoot => m_Wrapper.m_Player_Shoot;
|
|
public InputAction @Shield => m_Wrapper.m_Player_Shield;
|
|
public InputAction @Dash => m_Wrapper.m_Player_Dash;
|
|
public InputAction @RotateOld => m_Wrapper.m_Player_RotateOld;
|
|
public InputAction @Rotate => m_Wrapper.m_Player_Rotate;
|
|
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)
|
|
{
|
|
@Walk.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnWalk;
|
|
@Walk.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnWalk;
|
|
@Walk.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnWalk;
|
|
@Jump.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnJump;
|
|
@Jump.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnJump;
|
|
@Jump.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnJump;
|
|
@Shoot.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnShoot;
|
|
@Shoot.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnShoot;
|
|
@Shoot.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnShoot;
|
|
@Shield.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnShield;
|
|
@Shield.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnShield;
|
|
@Shield.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnShield;
|
|
@Dash.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnDash;
|
|
@Dash.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnDash;
|
|
@Dash.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnDash;
|
|
@RotateOld.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnRotateOld;
|
|
@RotateOld.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnRotateOld;
|
|
@RotateOld.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnRotateOld;
|
|
@Rotate.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnRotate;
|
|
@Rotate.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnRotate;
|
|
@Rotate.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnRotate;
|
|
}
|
|
m_Wrapper.m_PlayerActionsCallbackInterface = instance;
|
|
if (instance != null)
|
|
{
|
|
@Walk.started += instance.OnWalk;
|
|
@Walk.performed += instance.OnWalk;
|
|
@Walk.canceled += instance.OnWalk;
|
|
@Jump.started += instance.OnJump;
|
|
@Jump.performed += instance.OnJump;
|
|
@Jump.canceled += instance.OnJump;
|
|
@Shoot.started += instance.OnShoot;
|
|
@Shoot.performed += instance.OnShoot;
|
|
@Shoot.canceled += instance.OnShoot;
|
|
@Shield.started += instance.OnShield;
|
|
@Shield.performed += instance.OnShield;
|
|
@Shield.canceled += instance.OnShield;
|
|
@Dash.started += instance.OnDash;
|
|
@Dash.performed += instance.OnDash;
|
|
@Dash.canceled += instance.OnDash;
|
|
@RotateOld.started += instance.OnRotateOld;
|
|
@RotateOld.performed += instance.OnRotateOld;
|
|
@RotateOld.canceled += instance.OnRotateOld;
|
|
@Rotate.started += instance.OnRotate;
|
|
@Rotate.performed += instance.OnRotate;
|
|
@Rotate.canceled += instance.OnRotate;
|
|
}
|
|
}
|
|
}
|
|
public PlayerActions @Player => new PlayerActions(this);
|
|
|
|
// UI
|
|
private readonly InputActionMap m_UI;
|
|
private IUIActions m_UIActionsCallbackInterface;
|
|
private readonly InputAction m_UI_Controls;
|
|
private readonly InputAction m_UI_Restart;
|
|
public struct UIActions
|
|
{
|
|
private @FPSPlayerInputActions m_Wrapper;
|
|
public UIActions(@FPSPlayerInputActions wrapper) { m_Wrapper = wrapper; }
|
|
public InputAction @Controls => m_Wrapper.m_UI_Controls;
|
|
public InputAction @Restart => m_Wrapper.m_UI_Restart;
|
|
public InputActionMap Get() { return m_Wrapper.m_UI; }
|
|
public void Enable() { Get().Enable(); }
|
|
public void Disable() { Get().Disable(); }
|
|
public bool enabled => Get().enabled;
|
|
public static implicit operator InputActionMap(UIActions set) { return set.Get(); }
|
|
public void SetCallbacks(IUIActions instance)
|
|
{
|
|
if (m_Wrapper.m_UIActionsCallbackInterface != null)
|
|
{
|
|
@Controls.started -= m_Wrapper.m_UIActionsCallbackInterface.OnControls;
|
|
@Controls.performed -= m_Wrapper.m_UIActionsCallbackInterface.OnControls;
|
|
@Controls.canceled -= m_Wrapper.m_UIActionsCallbackInterface.OnControls;
|
|
@Restart.started -= m_Wrapper.m_UIActionsCallbackInterface.OnRestart;
|
|
@Restart.performed -= m_Wrapper.m_UIActionsCallbackInterface.OnRestart;
|
|
@Restart.canceled -= m_Wrapper.m_UIActionsCallbackInterface.OnRestart;
|
|
}
|
|
m_Wrapper.m_UIActionsCallbackInterface = instance;
|
|
if (instance != null)
|
|
{
|
|
@Controls.started += instance.OnControls;
|
|
@Controls.performed += instance.OnControls;
|
|
@Controls.canceled += instance.OnControls;
|
|
@Restart.started += instance.OnRestart;
|
|
@Restart.performed += instance.OnRestart;
|
|
@Restart.canceled += instance.OnRestart;
|
|
}
|
|
}
|
|
}
|
|
public UIActions @UI => new UIActions(this);
|
|
public interface IPlayerActions
|
|
{
|
|
void OnWalk(InputAction.CallbackContext context);
|
|
void OnJump(InputAction.CallbackContext context);
|
|
void OnShoot(InputAction.CallbackContext context);
|
|
void OnShield(InputAction.CallbackContext context);
|
|
void OnDash(InputAction.CallbackContext context);
|
|
void OnRotateOld(InputAction.CallbackContext context);
|
|
void OnRotate(InputAction.CallbackContext context);
|
|
}
|
|
public interface IUIActions
|
|
{
|
|
void OnControls(InputAction.CallbackContext context);
|
|
void OnRestart(InputAction.CallbackContext context);
|
|
}
|
|
}
|