GameConfig.cs 577 B

123456789101112131415161718192021222324252627
  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. var result = JsonMapper.ToObject<Result>(json);
  14. LoginAddress = result.loginApiUrl;
  15. PlatformName = result.platformName;
  16. }
  17. private struct Result
  18. {
  19. public string loginApiUrl;
  20. public string platformName;
  21. }
  22. }
  23. }