CommonConfig.cs 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 (index == 0) return 0;
  18. else return 1;
  19. }
  20. }
  21. //根据产品名决定默认语言
  22. public static int AppLanguage { get => AppArea; }
  23. //禁止语言切换(ios安全上架)
  24. // public static bool banLanguageChangeSwitch { get => Application.platform == RuntimePlatform.IPhonePlayer; }
  25. public static bool banLanguageChangeSwitch { get => false; }
  26. //禁止绑定关联账号的相关功能(找回密码,注册界面绑定手机邮箱,个人界面绑定手机邮箱)
  27. // public static bool banBindRelateAccount { get => Application.platform == RuntimePlatform.IPhonePlayer; }
  28. public static bool banBindRelateAccount { get => false; }
  29. public static bool iosTaoKe = false; //IOS套壳开关
  30. public static bool ReleaseVersion2 = true;
  31. /*
  32. 特定版本功能
  33. 1、长接瞄准键,出来鼠标的功能帮忙去掉
  34. 2、在初始状态下,就装备上五倍射程卡和二倍瞄准镜
  35. 3、将60寸,2.5米的5倍数更改为60寸,1.5米的3倍数
  36. 4、进入游戏时,默认加开启射程卡
  37. */
  38. public static bool SpecialVersion1 = true;
  39. //需要App商店审核?-标记用于特别处理某些功能
  40. public static bool needToExamine = false;
  41. //是否属于发布版本?-标记用于特别处理某些功能,比如屏蔽内部测试才有功能
  42. public static bool isReleaseVersion = false;
  43. //设备方案
  44. public static int devicePlan = 3;
  45. /**环数精度小数位 */
  46. public static readonly int ringsPrecision = 1;
  47. /**箭的速度精度小数位 */
  48. public static readonly int arrowSpeedPrecision = 1;
  49. //实体模具箭重,单位克
  50. public static float arrowWeight = 75;
  51. public enum ServerType {LocalTest, Produce};
  52. private static ServerType serverType = ServerType.Produce;
  53. //网关服务器访问地址
  54. public static string gateServerURL {
  55. get {
  56. if (serverType == ServerType.Produce)
  57. {
  58. if (serverIndex == 0)
  59. return "http://118.195.187.121/SmartBowBusinessServer";
  60. else if (serverIndex == 1)
  61. return "http://34.238.232.118/SmartBowBusinessServer";
  62. }
  63. return "http://192.168.101.3:11432/SmartBowBusinessServer";
  64. }
  65. }
  66. //业务服务端WS访问地址
  67. public static string businessServerWsURL;
  68. //游戏对战服务器
  69. public static string gamePKServerWsURL;
  70. public static int serverIndex { get => AppArea; }
  71. /// <summary>
  72. /// 弓箭SDK的服务端地址
  73. /// </summary>
  74. public static readonly string SmartBowSdkURL = "http://43.132.127.96/SmartBowBusinessServer";
  75. /// <summary>
  76. /// 单机模式是否开启
  77. /// </summary>
  78. public static bool StandaloneMode = true;
  79. }