refactor: converted vkeycode enum into a class
This commit is contained in:
parent
e3f6db7ae5
commit
68d3d8065e
19 changed files with 123 additions and 54 deletions
42
Assets/Scripts/Domain/Input/VKeyCode.cs
Normal file
42
Assets/Scripts/Domain/Input/VKeyCode.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Extensions;
|
||||
|
||||
namespace Domain.Input {
|
||||
public class VKeyCode : SmartEnum<VKeyCode, int> {
|
||||
public static VKeyCode A => new("A", 0x41);
|
||||
public static VKeyCode B => new("B", 0x42);
|
||||
public static VKeyCode C => new("C", 0x43);
|
||||
public static VKeyCode D => new("D", 0x44);
|
||||
public static VKeyCode E => new("E", 0x45);
|
||||
public static VKeyCode F => new("F", 0x46);
|
||||
public static VKeyCode G => new("G", 0x47);
|
||||
public static VKeyCode H => new("H", 0x48);
|
||||
public static VKeyCode I => new("I", 0x49);
|
||||
public static VKeyCode J => new("J", 0x4A);
|
||||
public static VKeyCode K => new("K", 0x4B);
|
||||
public static VKeyCode L => new("L", 0x4C);
|
||||
public static VKeyCode M => new("M", 0x4D);
|
||||
public static VKeyCode N => new("N", 0x4E);
|
||||
public static VKeyCode O => new("O", 0x4F);
|
||||
public static VKeyCode P => new("P", 0x50);
|
||||
public static VKeyCode Q => new("Q", 0x51);
|
||||
public static VKeyCode R => new("R", 0x52);
|
||||
public static VKeyCode S => new("S", 0x53);
|
||||
public static VKeyCode T => new("T", 0x54);
|
||||
public static VKeyCode U => new("U", 0x55);
|
||||
public static VKeyCode V => new("V", 0x56);
|
||||
public static VKeyCode W => new("W", 0x57);
|
||||
public static VKeyCode X => new("X", 0x58);
|
||||
public static VKeyCode Y => new("Y", 0x59);
|
||||
public static VKeyCode Z => new("Z", 0x5A);
|
||||
public static VKeyCode Interpunct => new("Interpunct", 0x33);
|
||||
public static VKeyCode Cedilla => new("Cedilla", 0xBF);
|
||||
public static VKeyCode AccentOpen => new("Accent Open", 0xBA);
|
||||
public static VKeyCode AccentClosed => new("Accent Closed", 0xDE);
|
||||
public static VKeyCode Shift => new("Shift", 0x10);
|
||||
|
||||
private VKeyCode(string name, int value) : base(name, value) { }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue