public static int GetDirectionIndex(NintendoSwitch.ECKey key) { int x = key.StickX; int y = key.StickY; if (x == NSwitchUtil.STICK_CENTER && y == NSwitchUtil.STICK_CENTER) { return(-1); } x = (int)Math.Round(x / 32d); y = (int)Math.Round(y / 32d); return(x >= y ? x + y : 32 - x - y); }
public KeyAction(NintendoSwitch.ECKey key) { Key = key; }
public KeyPress(NintendoSwitch.ECKey key, ValBase duration) : base(key) { Duration = duration; }
public KeyPress(NintendoSwitch.ECKey key) : base(key) { Duration = DefaultDuration; _omitted = true; }
public KeyUp(NintendoSwitch.ECKey key) : base(key) { }
public KeyDown(NintendoSwitch.ECKey key) : base(key) { }