GameConfig.cs 624 B

12345678910111213141516171819202122232425262728
  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. PlatformName = result.platformName;
  17. }
  18. private struct Result
  19. {
  20. public string loginApiUrl;
  21. public string platformName;
  22. }
  23. }
  24. }