35 lines
795 B
C#
35 lines
795 B
C#
|
|
using System;
|
||
|
|
using UnityEngine.EventSystems;
|
||
|
|
using UnityEngine.InputSystem;
|
||
|
|
|
||
|
|
namespace UnityEngine.UI
|
||
|
|
{
|
||
|
|
[DisallowMultipleComponent]
|
||
|
|
public sealed class HotkeyComponent : MonoBehaviour, IHotkeyTrigger
|
||
|
|
{
|
||
|
|
[SerializeField] private Component _component;
|
||
|
|
|
||
|
|
[SerializeField] private InputActionReference _hotkeyAction;
|
||
|
|
|
||
|
|
[SerializeField] private EHotkeyPressType _hotkeyPressType;
|
||
|
|
|
||
|
|
|
||
|
|
public InputActionReference HotkeyAction
|
||
|
|
{
|
||
|
|
get => _hotkeyAction;
|
||
|
|
set => _hotkeyAction = value;
|
||
|
|
}
|
||
|
|
|
||
|
|
EHotkeyPressType IHotkeyTrigger.HotkeyPressType
|
||
|
|
{
|
||
|
|
get => _hotkeyPressType;
|
||
|
|
set => _hotkeyPressType = value;
|
||
|
|
}
|
||
|
|
|
||
|
|
void IHotkeyTrigger.HotkeyActionTrigger()
|
||
|
|
{
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|