From b1b14c45ce95dcf7b81867d68d6006345d98959e Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 15 Oct 2020 05:41:48 +0800 Subject: *input system --- Assets/Scripts/Input/Command.cs | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Assets/Scripts/Input/Command.cs (limited to 'Assets/Scripts/Input/Command.cs') diff --git a/Assets/Scripts/Input/Command.cs b/Assets/Scripts/Input/Command.cs new file mode 100644 index 00000000..5ac2c2a0 --- /dev/null +++ b/Assets/Scripts/Input/Command.cs @@ -0,0 +1,34 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + + +public enum CommandCode +{ + Blank, + + // 方向键 + Left, + Right, + Up, + Down, + + // 操作键 + Triangle, // △ + Cross, // × + Square, // □ + Circle, // ○ +} + +public struct Command +{ + public CommandCode code; // 指令码 + public float time; // 触发时间 + + public Command(CommandCode code, float time) + { + this.code = code; + this.time = time; + } +} + -- cgit v1.1-26-g67d0