|
@@ -8,6 +8,7 @@ namespace GFGGame
|
|
{
|
|
{
|
|
public enum EnumNetType { DEV, LOCAL, TEMP }
|
|
public enum EnumNetType { DEV, LOCAL, TEMP }
|
|
public static EnumNetType netType = EnumNetType.LOCAL;
|
|
public static EnumNetType netType = EnumNetType.LOCAL;
|
|
|
|
+ public static string cfgName;
|
|
public const int HTTP_GET_TIME_OUT = 3;
|
|
public const int HTTP_GET_TIME_OUT = 3;
|
|
public const int HTTP_POST_TIME_OUT = 15;
|
|
public const int HTTP_POST_TIME_OUT = 15;
|
|
public static string SOUND_KEY = "sound";
|
|
public static string SOUND_KEY = "sound";
|
|
@@ -27,24 +28,29 @@ namespace GFGGame
|
|
#if PT_DEV
|
|
#if PT_DEV
|
|
//ÍâÍødev°æ±¾
|
|
//ÍâÍødev°æ±¾
|
|
netType = EnumNetType.DEV;
|
|
netType = EnumNetType.DEV;
|
|
- string cfgName = "cfg_dev";
|
|
|
|
|
|
+ cfgName = "cfg_dev";
|
|
#elif PT_TEMP
|
|
#elif PT_TEMP
|
|
netType = EnumNetType.TEMP;
|
|
netType = EnumNetType.TEMP;
|
|
- string cfgName = "cfg_temp";
|
|
|
|
|
|
+ cfgName = "cfg_temp";
|
|
VEngine.Utility.buildPath = "Bundles_temp";
|
|
VEngine.Utility.buildPath = "Bundles_temp";
|
|
#else
|
|
#else
|
|
netType = EnumNetType.LOCAL;
|
|
netType = EnumNetType.LOCAL;
|
|
- string cfgName = "cfg_local";
|
|
|
|
|
|
+ cfgName = "cfg_local";
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+ //Debug.Log($"loginApiUrl {loginApiUrl} netType {netType}");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static void GetPlatformCfg()
|
|
|
|
+ {
|
|
string url = $"http://39.99.144.134/res/platform/{cfgName}.json";
|
|
string url = $"http://39.99.144.134/res/platform/{cfgName}.json";
|
|
-
|
|
|
|
|
|
+
|
|
HttpTool.Instance.Get(url, "", (string data) => {
|
|
HttpTool.Instance.Get(url, "", (string data) => {
|
|
ResultHandler(data);
|
|
ResultHandler(data);
|
|
});
|
|
});
|
|
- Debug.Log($"loginApiUrl {loginApiUrl} netType {netType}");
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
private static void ResultHandler(string data)
|
|
private static void ResultHandler(string data)
|
|
{
|
|
{
|
|
var result = JsonMapper.ToObject<Result>(data);
|
|
var result = JsonMapper.ToObject<Result>(data);
|