GameConfig.cs 922 B

12345678910111213141516171819202122232425262728293031323334
  1. using System.Collections;
  2. using ET;
  3. using LitJson;
  4. using UnityEngine;
  5. namespace GFGGame
  6. {
  7. public class GameConfig
  8. {
  9. public static string LoginAddress;
  10. public static string PlatformName;
  11. public static string logApiReportUrl;
  12. public static int showGM;
  13. public static void InitData(string json)
  14. {
  15. ET.Log.Debug($"gamecfg \n{json}");
  16. var result = JsonMapper.ToObject<Result>(json);
  17. LoginAddress = result.loginApiUrl;
  18. //LoginAddress = "10.108.64.127:10005";
  19. PlatformName = result.platformName;
  20. showGM = int.Parse(result.showGM);
  21. GameConfig.logApiReportUrl = LauncherConfig.logApiRootUrl + "ReportGet";
  22. }
  23. private struct Result
  24. {
  25. public string loginApiUrl;
  26. public string platformName;
  27. public string showGM;
  28. }
  29. }
  30. }