1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- using Godot;
- namespace TBL.GodotSharp.Input
- {
- /// <summary>
- /// 输入扩展
- /// </summary>
- public class InputExtra : Node
- {
- /// <summary>
- /// 控制器类型
- /// </summary>
- public enum ControllerType
- {
- /// <summary>
- /// 鼠标
- /// </summary>
- Mouse,
- /// <summary>
- /// 触摸
- /// </summary>
- Touch,
- /// <summary>
- /// 纯按钮(手柄/键盘)
- /// </summary>
- Button
- }
- /// <summary>
- /// 最后一次操作的控制器类型
- /// </summary>
- public ControllerType LastControllerType { get; private set; }
- public override void _EnterTree()
- {
- Name = nameof(InputExtra);
- }
- public override void _Input(InputEvent evt)
- {
- // TODO:
- }
- }
- }
|