CommonConfig.cs 2.7 KB

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