GameConfig.cs 676 B

1234567891011121314151617181920212223242526272829
  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 void InitData(string json)
  12. {
  13. ET.Log.Debug($"gamecfg \n{json}");
  14. var result = JsonMapper.ToObject<Result>(json);
  15. LoginAddress = result.loginApiUrl;
  16. //LoginAddress = "10.108.64.127:10005";
  17. PlatformName = result.platformName;
  18. }
  19. private struct Result
  20. {
  21. public string loginApiUrl;
  22. public string platformName;
  23. }
  24. }
  25. }