IndieGame/client/Assets/Ether/Scripts/Module/Input/EtherInputKeyCfg.cs
2024-10-28 03:42:42 +08:00

45 lines
957 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using UnityEngine;
using UnityEngine.Serialization;
namespace Ether
{
[Serializable]
public class EtherInputKeyCfg
{
[VerticalGroup("键"), HideLabel]
public KeyCode KeyCode;
[VerticalGroup("键类型"), HideLabel]
public EtherInputKeyType KeyType;
[VerticalGroup("键描述"), HideLabel]
public string KeyDescription;
[VerticalGroup("绑定事件")]
[LabelText("事件列表")]
public List<EtherInputEvent> EventList = new List<EtherInputEvent>();
[VerticalGroup("排序"), HideLabel, ShowIf("KeyType", EtherInputKeyType.Interaction)]
public int SortIndex;
}
[Serializable]
public enum EtherInputKeyType
{
[InspectorName("动作")]
Action = 0,
[InspectorName("交互")]
Interaction = 1,
}
public enum DeviceType
{
[InspectorName("键盘")]
Keyboard = 0,
[InspectorName("手柄")]
Joystick = 1,
}
}