InputDataKS.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using UnityEngine;
  7. namespace SC.XR.Unity.Module_InputSystem.InputDeviceGC.KS {
  8. public class InputDataKS : InputDataGC {
  9. public InputDeviceKSPart inputDeviceKSPart;
  10. public InputDataKS(InputDeviceKSPart inputDeviceKSPart) : base(inputDeviceKSPart) {
  11. this.inputDeviceKSPart = inputDeviceKSPart;
  12. }
  13. public KSIndex ksIndex {
  14. get {
  15. if(inputDeviceKSPart.PartType == InputDevicePartType.KSLeft) {
  16. return KSIndex.Left;
  17. } else if(inputDeviceKSPart.PartType == InputDevicePartType.KSRight) {
  18. return KSIndex.Right;
  19. }
  20. return KSIndex.UnKnow;
  21. }
  22. }
  23. public class HallData {
  24. public int deviceID;
  25. public int HallFoward;
  26. public int HallInside;
  27. }
  28. public static List<HallData> TempHallDataList = new List<HallData>();
  29. public int HallFoward = 10;
  30. public int HallInside = 10;
  31. public class BatteryPowerData {
  32. public int deviceID;
  33. public int BatteryPower;
  34. }
  35. public static List<BatteryPowerData> TempBatteryPowerDataList = new List<BatteryPowerData>();
  36. public int BatteryPower;
  37. public class JoystickData {
  38. public int deviceID;
  39. public int JoystickX;
  40. public int JoystickY;
  41. }
  42. public static List<JoystickData> TempJoystickDataList = new List<JoystickData>();
  43. public int JoystickX = 8;
  44. public int JoystickY = 8;
  45. public class ChargingData {
  46. public int deviceID;
  47. public bool isCharging;
  48. }
  49. public static List<ChargingData> TempChargingDataList = new List<ChargingData>();
  50. public bool isCharging;
  51. public class StatusData {
  52. public int deviceID;
  53. public bool isConnected;
  54. }
  55. public static List<StatusData> StatusDataList = new List<StatusData>();
  56. }
  57. }