您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
676 行
28 KiB
676 行
28 KiB
// GENERATED AUTOMATICALLY FROM 'Assets/Settings/Input/GameInput.inputactions'
|
|
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine.InputSystem;
|
|
using UnityEngine.InputSystem.Utilities;
|
|
|
|
public class @GameInput : IInputActionCollection, IDisposable
|
|
{
|
|
public InputActionAsset asset { get; }
|
|
public @GameInput()
|
|
{
|
|
asset = InputActionAsset.FromJson(@"{
|
|
""name"": ""GameInput"",
|
|
""maps"": [
|
|
{
|
|
""name"": ""Gameplay"",
|
|
""id"": ""37734faa-64e4-48a4-901b-e0ff80b636be"",
|
|
""actions"": [
|
|
{
|
|
""name"": ""Move"",
|
|
""type"": ""Value"",
|
|
""id"": ""103cf56a-d357-491a-8559-592da00641cc"",
|
|
""expectedControlType"": ""Vector2"",
|
|
""processors"": ""StickDeadzone"",
|
|
""interactions"": """"
|
|
},
|
|
{
|
|
""name"": ""Jump"",
|
|
""type"": ""Button"",
|
|
""id"": ""d603fc26-b424-4cff-a593-71ee48e3d0ef"",
|
|
""expectedControlType"": ""Button"",
|
|
""processors"": """",
|
|
""interactions"": """"
|
|
},
|
|
{
|
|
""name"": ""Attack"",
|
|
""type"": ""Button"",
|
|
""id"": ""65a85ccc-c121-43d5-b6c9-83674e675ddc"",
|
|
""expectedControlType"": ""Button"",
|
|
""processors"": """",
|
|
""interactions"": """"
|
|
},
|
|
{
|
|
""name"": ""Interact"",
|
|
""type"": ""Button"",
|
|
""id"": ""d0d85176-6fc5-486b-bc5c-36cdd4cb6a54"",
|
|
""expectedControlType"": ""Button"",
|
|
""processors"": """",
|
|
""interactions"": """"
|
|
},
|
|
{
|
|
""name"": ""Pause"",
|
|
""type"": ""Button"",
|
|
""id"": ""f788c753-f77b-43bf-b5b7-bc98b77814ec"",
|
|
""expectedControlType"": ""Button"",
|
|
""processors"": """",
|
|
""interactions"": """"
|
|
},
|
|
{
|
|
""name"": ""ExtraAction"",
|
|
""type"": ""Button"",
|
|
""id"": ""1b6ae4df-f5e6-42fc-92b6-3dcc2e126563"",
|
|
""expectedControlType"": ""Button"",
|
|
""processors"": """",
|
|
""interactions"": """"
|
|
},
|
|
{
|
|
""name"": ""RotateCamera"",
|
|
""type"": ""Value"",
|
|
""id"": ""1c4a88b5-2474-4e49-8f10-f987bde2dee0"",
|
|
""expectedControlType"": ""Vector2"",
|
|
""processors"": """",
|
|
""interactions"": """"
|
|
}
|
|
],
|
|
""bindings"": [
|
|
{
|
|
""name"": ""Gamepad Left Stick"",
|
|
""id"": ""bb70cc63-ec03-4bda-b1f6-edc72656ba83"",
|
|
""path"": ""2DVector(mode=2)"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Move"",
|
|
""isComposite"": true,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": ""up"",
|
|
""id"": ""39063a94-c3b3-4fd9-8dd6-f53600a700dd"",
|
|
""path"": ""<Gamepad>/leftStick/up"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""down"",
|
|
""id"": ""49ff05d5-0d8a-4f79-bd99-fd41cdf0d7bd"",
|
|
""path"": ""<Gamepad>/leftStick/down"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""left"",
|
|
""id"": ""1fc52241-074a-41ac-8a81-2ce840b0290b"",
|
|
""path"": ""<Gamepad>/leftStick/left"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""right"",
|
|
""id"": ""dfd22222-a8e3-4cdb-8f48-6cbffc53def7"",
|
|
""path"": ""<Gamepad>/leftStick/right"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""Keyboard WASD"",
|
|
""id"": ""f8b893c4-85c2-492d-89ab-41f8d1520def"",
|
|
""path"": ""2DVector"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Move"",
|
|
""isComposite"": true,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": ""up"",
|
|
""id"": ""896f18e7-b01d-47a3-a018-7c2230b42022"",
|
|
""path"": ""<Keyboard>/w"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""down"",
|
|
""id"": ""2247f5b8-f6a1-4a90-89f4-9846090bd18c"",
|
|
""path"": ""<Keyboard>/s"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""left"",
|
|
""id"": ""204e90e1-b388-4636-9ba9-6f13df8ba19f"",
|
|
""path"": ""<Keyboard>/a"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""right"",
|
|
""id"": ""611822fd-3a0d-49e1-9c2b-960f877aba76"",
|
|
""path"": ""<Keyboard>/d"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""Keyboard Arrows"",
|
|
""id"": ""b437a09d-8ca4-4996-a2f1-edf980623f6e"",
|
|
""path"": ""2DVector"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Move"",
|
|
""isComposite"": true,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": ""up"",
|
|
""id"": ""d0910d75-c140-4885-b9be-5bb8deae80e0"",
|
|
""path"": ""<Keyboard>/upArrow"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""down"",
|
|
""id"": ""47380ccb-897f-4a93-bac4-3ea860b26105"",
|
|
""path"": ""<Keyboard>/downArrow"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""left"",
|
|
""id"": ""42344a1d-be6c-4a9b-855c-bb33dd318651"",
|
|
""path"": ""<Keyboard>/leftArrow"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""right"",
|
|
""id"": ""13a640b3-5350-4478-8218-495187c01f40"",
|
|
""path"": ""<Keyboard>/rightArrow"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Move"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""265ab87e-ba29-4a65-8b54-518f12192e5d"",
|
|
""path"": ""<Gamepad>/buttonSouth"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Jump"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""645ba428-0631-4e32-b9b0-eaac5d9ed36d"",
|
|
""path"": ""<Keyboard>/space"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Jump"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""95428e26-6672-49d7-b72b-ccbfd5b4267d"",
|
|
""path"": ""<Gamepad>/buttonWest"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Attack"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""91ce58d8-88e1-4ade-945b-59c4f0939828"",
|
|
""path"": ""<Keyboard>/j"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Attack"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""8b85e5da-3435-4347-9595-50cc57356b80"",
|
|
""path"": ""<Gamepad>/buttonEast"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Interact"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""433e8393-e1b1-484a-af51-d084849fe7c3"",
|
|
""path"": ""<Keyboard>/k"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Interact"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""d0e5ef4e-a086-4861-be73-3ab5ea76521f"",
|
|
""path"": ""<Gamepad>/start"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Pause"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""cd45c714-729f-438c-bdda-bbfa1bfd66ca"",
|
|
""path"": ""<Keyboard>/escape"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""Pause"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""937b421c-9467-4b47-a1fd-445b9b44d5c9"",
|
|
""path"": ""<Keyboard>/l"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""ExtraAction"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""ceb892d5-04df-4ccf-8ef6-2a5124d4a2e7"",
|
|
""path"": ""<Gamepad>/buttonNorth"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""ExtraAction"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": ""Gamepad Right Stick"",
|
|
""id"": ""e79b614b-8728-470d-91bc-53102c8434f5"",
|
|
""path"": ""2DVector(mode=2)"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""RotateCamera"",
|
|
""isComposite"": true,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": ""up"",
|
|
""id"": ""4e483eb2-4460-4dc1-af9f-9bcb31ebe837"",
|
|
""path"": ""<Gamepad>/rightStick/up"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""RotateCamera"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""down"",
|
|
""id"": ""edb40e4a-ef86-4338-904b-522590bc3cb0"",
|
|
""path"": ""<Gamepad>/rightStick/down"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""RotateCamera"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""left"",
|
|
""id"": ""398710b9-e1a8-4e26-8651-8e3ae6eb3b6e"",
|
|
""path"": ""<Gamepad>/rightStick/left"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""RotateCamera"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""right"",
|
|
""id"": ""597d020e-c169-4232-a603-7e5e35ce0c55"",
|
|
""path"": ""<Gamepad>/rightStick/right"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""RotateCamera"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""Keyboard TFGH"",
|
|
""id"": ""8e17360e-f036-4963-93f6-05d14787dfb5"",
|
|
""path"": ""2DVector"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""RotateCamera"",
|
|
""isComposite"": true,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": ""up"",
|
|
""id"": ""9a4ec3f5-78bf-4f42-b7d7-f1edd7ce12dc"",
|
|
""path"": ""<Keyboard>/t"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""RotateCamera"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""down"",
|
|
""id"": ""5d82874e-55d8-4d54-84f5-c4d59dc3b39c"",
|
|
""path"": ""<Keyboard>/g"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""RotateCamera"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""left"",
|
|
""id"": ""13a13bd5-f4ec-4f5b-9a8e-ef1165cc9f5f"",
|
|
""path"": ""<Keyboard>/f"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""RotateCamera"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
},
|
|
{
|
|
""name"": ""right"",
|
|
""id"": ""78626b57-196b-4f24-9a3f-af2477d3633b"",
|
|
""path"": ""<Keyboard>/h"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": ""KeyboardOrGamepad"",
|
|
""action"": ""RotateCamera"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
""name"": ""Menus"",
|
|
""id"": ""a6b0dc37-2ef3-420d-990a-eef5df26ae21"",
|
|
""actions"": [],
|
|
""bindings"": []
|
|
}
|
|
],
|
|
""controlSchemes"": [
|
|
{
|
|
""name"": ""KeyboardOrGamepad"",
|
|
""bindingGroup"": ""KeyboardOrGamepad"",
|
|
""devices"": [
|
|
{
|
|
""devicePath"": ""<Gamepad>"",
|
|
""isOptional"": true,
|
|
""isOR"": false
|
|
},
|
|
{
|
|
""devicePath"": ""<Keyboard>"",
|
|
""isOptional"": false,
|
|
""isOR"": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}");
|
|
// Gameplay
|
|
m_Gameplay = asset.FindActionMap("Gameplay", throwIfNotFound: true);
|
|
m_Gameplay_Move = m_Gameplay.FindAction("Move", throwIfNotFound: true);
|
|
m_Gameplay_Jump = m_Gameplay.FindAction("Jump", throwIfNotFound: true);
|
|
m_Gameplay_Attack = m_Gameplay.FindAction("Attack", throwIfNotFound: true);
|
|
m_Gameplay_Interact = m_Gameplay.FindAction("Interact", throwIfNotFound: true);
|
|
m_Gameplay_Pause = m_Gameplay.FindAction("Pause", throwIfNotFound: true);
|
|
m_Gameplay_ExtraAction = m_Gameplay.FindAction("ExtraAction", throwIfNotFound: true);
|
|
m_Gameplay_RotateCamera = m_Gameplay.FindAction("RotateCamera", throwIfNotFound: true);
|
|
// Menus
|
|
m_Menus = asset.FindActionMap("Menus", 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();
|
|
}
|
|
|
|
// Gameplay
|
|
private readonly InputActionMap m_Gameplay;
|
|
private IGameplayActions m_GameplayActionsCallbackInterface;
|
|
private readonly InputAction m_Gameplay_Move;
|
|
private readonly InputAction m_Gameplay_Jump;
|
|
private readonly InputAction m_Gameplay_Attack;
|
|
private readonly InputAction m_Gameplay_Interact;
|
|
private readonly InputAction m_Gameplay_Pause;
|
|
private readonly InputAction m_Gameplay_ExtraAction;
|
|
private readonly InputAction m_Gameplay_RotateCamera;
|
|
public struct GameplayActions
|
|
{
|
|
private @GameInput m_Wrapper;
|
|
public GameplayActions(@GameInput wrapper) { m_Wrapper = wrapper; }
|
|
public InputAction @Move => m_Wrapper.m_Gameplay_Move;
|
|
public InputAction @Jump => m_Wrapper.m_Gameplay_Jump;
|
|
public InputAction @Attack => m_Wrapper.m_Gameplay_Attack;
|
|
public InputAction @Interact => m_Wrapper.m_Gameplay_Interact;
|
|
public InputAction @Pause => m_Wrapper.m_Gameplay_Pause;
|
|
public InputAction @ExtraAction => m_Wrapper.m_Gameplay_ExtraAction;
|
|
public InputAction @RotateCamera => m_Wrapper.m_Gameplay_RotateCamera;
|
|
public InputActionMap Get() { return m_Wrapper.m_Gameplay; }
|
|
public void Enable() { Get().Enable(); }
|
|
public void Disable() { Get().Disable(); }
|
|
public bool enabled => Get().enabled;
|
|
public static implicit operator InputActionMap(GameplayActions set) { return set.Get(); }
|
|
public void SetCallbacks(IGameplayActions instance)
|
|
{
|
|
if (m_Wrapper.m_GameplayActionsCallbackInterface != null)
|
|
{
|
|
@Move.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove;
|
|
@Move.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove;
|
|
@Move.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove;
|
|
@Jump.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump;
|
|
@Jump.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump;
|
|
@Jump.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump;
|
|
@Attack.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnAttack;
|
|
@Attack.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnAttack;
|
|
@Attack.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnAttack;
|
|
@Interact.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnInteract;
|
|
@Interact.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnInteract;
|
|
@Interact.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnInteract;
|
|
@Pause.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPause;
|
|
@Pause.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPause;
|
|
@Pause.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPause;
|
|
@ExtraAction.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnExtraAction;
|
|
@ExtraAction.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnExtraAction;
|
|
@ExtraAction.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnExtraAction;
|
|
@RotateCamera.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnRotateCamera;
|
|
@RotateCamera.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnRotateCamera;
|
|
@RotateCamera.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnRotateCamera;
|
|
}
|
|
m_Wrapper.m_GameplayActionsCallbackInterface = instance;
|
|
if (instance != null)
|
|
{
|
|
@Move.started += instance.OnMove;
|
|
@Move.performed += instance.OnMove;
|
|
@Move.canceled += instance.OnMove;
|
|
@Jump.started += instance.OnJump;
|
|
@Jump.performed += instance.OnJump;
|
|
@Jump.canceled += instance.OnJump;
|
|
@Attack.started += instance.OnAttack;
|
|
@Attack.performed += instance.OnAttack;
|
|
@Attack.canceled += instance.OnAttack;
|
|
@Interact.started += instance.OnInteract;
|
|
@Interact.performed += instance.OnInteract;
|
|
@Interact.canceled += instance.OnInteract;
|
|
@Pause.started += instance.OnPause;
|
|
@Pause.performed += instance.OnPause;
|
|
@Pause.canceled += instance.OnPause;
|
|
@ExtraAction.started += instance.OnExtraAction;
|
|
@ExtraAction.performed += instance.OnExtraAction;
|
|
@ExtraAction.canceled += instance.OnExtraAction;
|
|
@RotateCamera.started += instance.OnRotateCamera;
|
|
@RotateCamera.performed += instance.OnRotateCamera;
|
|
@RotateCamera.canceled += instance.OnRotateCamera;
|
|
}
|
|
}
|
|
}
|
|
public GameplayActions @Gameplay => new GameplayActions(this);
|
|
|
|
// Menus
|
|
private readonly InputActionMap m_Menus;
|
|
private IMenusActions m_MenusActionsCallbackInterface;
|
|
public struct MenusActions
|
|
{
|
|
private @GameInput m_Wrapper;
|
|
public MenusActions(@GameInput wrapper) { m_Wrapper = wrapper; }
|
|
public InputActionMap Get() { return m_Wrapper.m_Menus; }
|
|
public void Enable() { Get().Enable(); }
|
|
public void Disable() { Get().Disable(); }
|
|
public bool enabled => Get().enabled;
|
|
public static implicit operator InputActionMap(MenusActions set) { return set.Get(); }
|
|
public void SetCallbacks(IMenusActions instance)
|
|
{
|
|
if (m_Wrapper.m_MenusActionsCallbackInterface != null)
|
|
{
|
|
}
|
|
m_Wrapper.m_MenusActionsCallbackInterface = instance;
|
|
if (instance != null)
|
|
{
|
|
}
|
|
}
|
|
}
|
|
public MenusActions @Menus => new MenusActions(this);
|
|
private int m_KeyboardOrGamepadSchemeIndex = -1;
|
|
public InputControlScheme KeyboardOrGamepadScheme
|
|
{
|
|
get
|
|
{
|
|
if (m_KeyboardOrGamepadSchemeIndex == -1) m_KeyboardOrGamepadSchemeIndex = asset.FindControlSchemeIndex("KeyboardOrGamepad");
|
|
return asset.controlSchemes[m_KeyboardOrGamepadSchemeIndex];
|
|
}
|
|
}
|
|
public interface IGameplayActions
|
|
{
|
|
void OnMove(InputAction.CallbackContext context);
|
|
void OnJump(InputAction.CallbackContext context);
|
|
void OnAttack(InputAction.CallbackContext context);
|
|
void OnInteract(InputAction.CallbackContext context);
|
|
void OnPause(InputAction.CallbackContext context);
|
|
void OnExtraAction(InputAction.CallbackContext context);
|
|
void OnRotateCamera(InputAction.CallbackContext context);
|
|
}
|
|
public interface IMenusActions
|
|
{
|
|
}
|
|
}
|