IndieGame/client/Assets/Ether/Scripts/Module/Input/ReInput/ReInput.cs

44 lines
1.0 KiB
C#
Raw Normal View History

2024-10-11 10:12:15 +08:00

using Sirenix.OdinInspector;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Ether
{
[Serializable]
public class ReKey
{
[VerticalGroup("键"), HideLabel]
public KeyCode KeyCode;
[VerticalGroup("键类型"), HideLabel]
public ReKeyType KeyType;
[VerticalGroup("键描述"), HideLabel]
public string KeyDescription;
[VerticalGroup("绑定事件"), HideLabel, ShowIf("KeyType", ReKeyType.Action)]
public ReInputEvent Event;
[VerticalGroup("排序"), HideLabel, ShowIf("KeyType", ReKeyType.Interaction)]
public int SortIndex;
}
[Serializable]
public enum ReKeyType
{
[InspectorName("动作")]
Action = 0,
[InspectorName("交互")]
Interaction = 1,
}
[Serializable]
public enum ReDeviceType
{
[InspectorName("键盘")]
Keyboard = 0,
[InspectorName("手柄")]
Joystick = 1,
}
}