CommonConfig.cs 2.9 KB

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