CommonConfig.cs 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. /**通用配置(2021/12/18新增) */
  6. public class CommonConfig
  7. {
  8. //青凤鸾 WONDERFITTER
  9. public static readonly string[] AppNames = { "WONDER FITTER 运动", "WONDER FITTER" };
  10. //App地区(0:国内版;1:海外版;)
  11. public static int AppArea
  12. {
  13. get
  14. {
  15. //Application.identifier.Contains("com.xmjssvr.BowArrow.mi")
  16. //int index = Application.identifier == "com.xmjssvr.BowArrow" ? 0 : 1; // Array.IndexOf(AppNames, Application.productName);
  17. #if UNITY_IOS
  18. int index = Application.identifier == "com.xmjssvr.BowArrow" ? 0 : 1;//海外版 com.xmjssvr.BowArrowEn
  19. #endif
  20. #if UNITY_ANDROID
  21. int index = Application.identifier == "com.xmjssvr.BowArrow.mi" ? 0 : 1;//海外版 com.xmjssvr.BowArrowEn
  22. #endif
  23. if (index == 0) return 0;
  24. else return 1;
  25. }
  26. }
  27. //根据产品名决定默认语言
  28. public static int AppLanguage { get => AppArea; }
  29. //禁止语言切换(ios安全上架)
  30. // public static bool banLanguageChangeSwitch { get => Application.platform == RuntimePlatform.IPhonePlayer; }
  31. public static bool banLanguageChangeSwitch { get => false; }
  32. //禁止绑定关联账号的相关功能(找回密码,注册界面绑定手机邮箱,个人界面绑定手机邮箱)
  33. // public static bool banBindRelateAccount { get => Application.platform == RuntimePlatform.IPhonePlayer; }
  34. public static bool banBindRelateAccount { get => false; }
  35. public static bool iosTaoKe = false; //IOS套壳开关
  36. public static bool ReleaseVersion2 = true;
  37. /*
  38. 特定版本功能
  39. 1、长接瞄准键,出来鼠标的功能帮忙去掉
  40. 2、在初始状态下,就装备上五倍射程卡和二倍瞄准镜
  41. 3、将60寸,2.5米的5倍数更改为60寸,1.5米的3倍数
  42. 4、进入游戏时,默认加开启射程卡
  43. */
  44. public static bool SpecialVersion1 = true;
  45. //需要App商店审核?-标记用于特别处理某些功能
  46. public static bool needToExamine = false;
  47. //是否属于发布版本?-标记用于特别处理某些功能,比如屏蔽内部测试才有功能
  48. public static bool isReleaseVersion = false;
  49. //设备方案
  50. public static int devicePlan = 3;
  51. /**环数精度小数位 */
  52. public static readonly int ringsPrecision = 1;
  53. /**箭的速度精度小数位 */
  54. public static readonly int arrowSpeedPrecision = 1;
  55. //实体模具箭重,单位克
  56. public static float arrowWeight = 75;
  57. public enum ServerType { LocalTest, Produce };
  58. private static ServerType serverType = ServerType.Produce;
  59. //网关服务器访问地址
  60. public static string gateServerURL
  61. {
  62. get
  63. {
  64. if (serverType == ServerType.Produce)
  65. {
  66. if (serverIndex == 0)
  67. return "https://www.xmjssvr.com/SmartBowBusinessServer";//"http://118.195.187.121/SmartBowBusinessServer";等备案再使用域名
  68. else if (serverIndex == 1)
  69. return "https://www.wonderfittervr.com/SmartBowBusinessServer";//"http://54.165.56.200/SmartBowBusinessServer";
  70. }
  71. return "http://192.168.0.112:11432/SmartBowBusinessServer";
  72. }
  73. }
  74. //业务服务端WS访问地址
  75. public static string businessServerWsURL;
  76. //游戏对战服务器
  77. public static string gamePKServerWsURL;
  78. public static int serverIndex { get => AppArea; }
  79. /// <summary>
  80. /// 弓箭SDK的服务端地址
  81. /// </summary>
  82. public static readonly string SmartBowSdkURL = "http://43.132.127.96/SmartBowBusinessServer";
  83. /// <summary>
  84. /// 单机模式是否开启
  85. /// </summary>
  86. public static bool StandaloneMode = false;
  87. }