DeviceMgr.cs 621 B

12345678910111213141516171819202122232425262728293031
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using Newtonsoft.Json;
  5. public class DeviceMgr
  6. {
  7. static DeviceMgr _ins = null;
  8. public static DeviceMgr ins {
  9. get {
  10. if (_ins == null) {
  11. _ins = new DeviceMgr();
  12. }
  13. return _ins;
  14. }
  15. }
  16. }
  17. public class DeviceInfo
  18. {
  19. public int id = 0;
  20. public bool inuse = false;
  21. [JsonIgnore]
  22. public DeviceConfig config = null;
  23. }
  24. public class DeviceConfig
  25. {
  26. public int id = 0;
  27. public string name = "";
  28. public string detail = "";
  29. public int difficulty = 0;
  30. }