RoundStorage.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System;
  2. using System.Collections.Generic;
  3. public static class RoundStorage
  4. {
  5. private static Dictionary<string, int> StorageDict
  6. {
  7. get
  8. {
  9. return R.GameData.ThisRoundValidStorage;
  10. }
  11. }
  12. public static bool Contain(string key)
  13. {
  14. return StorageUtil.Contain(RoundStorage.StorageDict, key);
  15. }
  16. public static void Set(string id, bool value)
  17. {
  18. StorageUtil.Set(RoundStorage.StorageDict, id, value);
  19. }
  20. public static void Set(string id, int value)
  21. {
  22. StorageUtil.Set(RoundStorage.StorageDict, id, value);
  23. }
  24. public static bool Get(string id, bool defaultValue)
  25. {
  26. return StorageUtil.Get(RoundStorage.StorageDict, id, defaultValue);
  27. }
  28. public static int Get(string id, int defaultValue)
  29. {
  30. return StorageUtil.Get(RoundStorage.StorageDict, id, defaultValue);
  31. }
  32. public static bool GetBool(string id)
  33. {
  34. return StorageUtil.GetBool(RoundStorage.StorageDict, id);
  35. }
  36. public static int Get(string id)
  37. {
  38. return StorageUtil.Get(RoundStorage.StorageDict, id);
  39. }
  40. public static void Clear()
  41. {
  42. RoundStorage.StorageDict.Clear();
  43. }
  44. }