| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- /**通用配置(2021/12/18新增) */
- public class CommonConfig
- {
- //青凤鸾 WONDERFITTER ,WONDER FITTER Pro ,WONDER FITTER 运动
- public static readonly string[] AppNames = { "WONDERFITTER Pro 运动", "WONDER FITTER Pro", "WONDERFITTER PRO B" };
- //App地区(0:国内版;1:海外版;)
- public static int AppArea
- {
- get
- {
- //Application.identifier.Contains("com.xmjssvr.BowArrow.mi")
- //int index = Application.identifier == "com.xmjssvr.BowArrow" ? 0 : 1; // Array.IndexOf(AppNames, Application.productName);
- #if UNITY_IOS
- int index = Application.identifier == "com.xmjssvr.BowArrow" ? 0 : 1;//海外版 com.xmjssvr.BowArrowEn
- #endif
- #if UNITY_ANDROID
- int index = 0;
- if (StandaloneModeOrPlatformB)
- {
- //b端
- index = Application.identifier == "com.xmjssvr.BowArrow.miBClient" ? 0 : 1;//海外版 com.xmjssvr.BowArrowEn
- }
- else {
- index = Application.identifier == "com.xmjssvr.BowArrow.mi" ? 0 : 1;//海外版 com.xmjssvr.BowArrowEn
- }
- #endif
- #if UNITY_STANDALONE_WIN
- //pc版
- int index = 0;
- #endif
- if (index == 0) return 0;
- else return 1;
- }
- }
- //根据产品名决定默认语言
- public static int AppLanguage { get => AppArea; }
- //禁止语言切换(ios安全上架)
- // public static bool banLanguageChangeSwitch { get => Application.platform == RuntimePlatform.IPhonePlayer; }
- public static bool banLanguageChangeSwitch { get => false; }
- //禁止绑定关联账号的相关功能(找回密码,注册界面绑定手机邮箱,个人界面绑定手机邮箱)
- // public static bool banBindRelateAccount { get => Application.platform == RuntimePlatform.IPhonePlayer; }
- public static bool banBindRelateAccount { get => false; }
- public static bool iosTaoKe = false; //IOS套壳开关
- public static bool ReleaseVersion2 = true;
- /*
- 特定版本功能
- 1、长接瞄准键,出来鼠标的功能帮忙去掉
- 2、在初始状态下,就装备上五倍射程卡和二倍瞄准镜
- 3、将60寸,2.5米的5倍数更改为60寸,1.5米的3倍数
- 4、进入游戏时,默认加开启射程卡
- */
- public static bool SpecialVersion1 = true;
- //需要App商店审核?-标记用于特别处理某些功能
- public static bool needToExamine = false;
- //是否属于发布版本?-标记用于特别处理某些功能,比如屏蔽内部测试才有功能
- public static bool isReleaseVersion = false;
- //设备方案
- public static int devicePlan = 3;
- /**环数精度小数位 */
- public static readonly int ringsPrecision = 1;
- /**箭的速度精度小数位 */
- public static readonly int arrowSpeedPrecision = 1;
- //实体模具箭重,单位克
- public static float arrowWeight = 75;
- #region 校准引导时候。校准的时间
- /**弓箭方案时间 */
- public static float calibrationTimeArchery { get; } = 10;
- /**枪时间*/
- public static float calibrationTimeGun { get; } = 10;
- #endregion
- public enum ServerType { LocalTest, Produce, Test };
- private static ServerType serverType = ServerType.Produce;
- //网关服务器访问地址
- public static string gateServerURL
- {
- get
- {
- if (serverType == ServerType.Produce)
- {
- Debug.Log("****************** 正式服务器: " + serverIndex + " ********************");
- if (serverIndex == 0)
- return "https://www.xmjssvr.com/SmartBowBusinessServer";//"http://118.195.187.121/SmartBowBusinessServer";等备案再使用域名
- else if (serverIndex == 1)
- return "https://www.wonderfittervr.com/SmartBowBusinessServer";//"http://54.165.56.200/SmartBowBusinessServer";
- }
- else if (serverType == ServerType.Test)
- {
- Debug.Log("****************** 测试服务器 ********************");
- //测试服务器
- return "http://www.b-beng.com/SmartBowBusinessServer";
- }
- return "http://192.168.0.105:11432/SmartBowBusinessServer";
- }
- }
- //业务服务端WS访问地址
- public static string businessServerWsURL;
- //游戏对战服务器
- public static string gamePKServerWsURL;
- public static int serverIndex { get => AppArea; }
- /// <summary>
- /// 弓箭SDK的服务端地址
- /// </summary>
- public static readonly string SmartBowSdkURL = "http://43.132.127.96/SmartBowBusinessServer";
- #region 根据不同平台不同版本配置打包 bool
- /// <summary>
- /// 单机模式是否开启
- /// </summary>
- public static bool StandaloneMode { get; } = false; // 默认false
- /// <summary>
- /// 是否开启设备验证。
- /// 暂时Pc开启验证
- /// </summary>
- #if UNITY_STANDALONE_WIN || UNITY_EDITOR
- public static bool EnableDecryption = false; // 默认true
- #else
- public static bool EnableDecryption = false;
- #endif
- /// <summary>
- /// 是否打包红外软件App,这里主要和九轴有区别
- /// </summary>
- public static bool bInfraredApp { get; } = true;
- //打包App 的端,比如打包B 端就设置 B
- public static OperatingPlatform OP { get; } = OperatingPlatform.C;
- //是否是投币功能
- public static bool bSupportCoin { get; } = false;
- #endregion
- //单机版,B端,投币功能
- public static bool StandaloneModeOrPlatformB { get => StandaloneMode && OP == OperatingPlatform.B && bSupportCoin; }
- }
- //打包App 的端
- public enum OperatingPlatform
- {
- //A端
- A,
- //B端
- B,
- //C端
- C,
- }
|