|
|
@@ -1,3 +1,4 @@
|
|
|
+using System;
|
|
|
using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
|
using UnityEngine;
|
|
|
@@ -5,8 +6,14 @@ using UnityEngine;
|
|
|
/**通用配置(2021/12/18新增) */
|
|
|
public class CommonConfig
|
|
|
{
|
|
|
- //App初始语言设置
|
|
|
- public static readonly int AppLanguage = 1;
|
|
|
+ public static readonly string[] AppNames = {"青凤鸾", "HOUYI"};
|
|
|
+ public static readonly int[] AppLanguages = {0, 1};
|
|
|
+ public static readonly int[] ServerIndexes = {0, 1};
|
|
|
+ //根据产品名决定默认语言
|
|
|
+ public static int AppLanguage
|
|
|
+ {
|
|
|
+ get => AppLanguages[Array.IndexOf(AppNames, Application.productName)];
|
|
|
+ }
|
|
|
public static bool ReleaseVersion2 = true;
|
|
|
/*
|
|
|
特定版本功能
|
|
|
@@ -49,10 +56,8 @@ public class CommonConfig
|
|
|
public static string businessServerWsURL;
|
|
|
//游戏对战服务器
|
|
|
public static string gamePKServerWsURL;
|
|
|
- public static int serverIndex {
|
|
|
- get {
|
|
|
- if (AppLanguage == 0) return 0;
|
|
|
- else return 1;
|
|
|
- }
|
|
|
+ public static int serverIndex
|
|
|
+ {
|
|
|
+ get => ServerIndexes[Array.IndexOf(AppNames, Application.productName)];
|
|
|
}
|
|
|
}
|