123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using System.Collections;
- using ET;
- using LitJson;
- using UnityEngine;
- namespace GFGGame
- {
- public class GameConfig
- {
- public static string LoginAddress;
- public static string PlatformName;
- public static string logApiReportUrl;
- public static int showGM;
- //开服时间
- public static long openTime = 0;
- public static void InitData(string json)
- {
- ET.Log.Debug($"gamecfg \n{json}");
- var result = JsonMapper.ToObject<Result>(json);
- LoginAddress = result.loginApiUrl;
- // LoginAddress = "http://login.gfg.com:10005";
- //LoginAddress = "127.0.0.1:10005";//测试地址
- PlatformName = result.platformName;
- showGM = int.Parse(result.showGM);
- if(!string.IsNullOrEmpty(result.openTime))
- {
- openTime = TimeUtil.GetTimestamp(result.openTime);
- }
- GameConfig.logApiReportUrl = LauncherConfig.logApiRootUrl + "ReportGet";
- }
- private struct Result
- {
- public string loginApiUrl;
- public string platformName;
- public string showGM;
- public string openTime;
- }
- }
- }
|