blob: 7ef6c9eb746d2f2882f79116258a5afcdb97f46a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public enum GamepadButton
{
Blank,
// 方向键
Left,
Right,
Up,
Down,
// 操作键
Triangle, // △
Cross, // ×
Square, // □
Circle, // ○
}
public struct Command
{
public GamepadButton code; // 指令码
public float time; // 触发时间
public int id;
public static Command Blank = new Command(GamepadButton.Blank, 0);
public Command(GamepadButton code, float time)
{
this.code = code;
this.time = time;
this.id = UIDManager.Acquire();
}
}
|