CommonConfig.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. public static bool ReleaseVersion2 = true;
  17. /*
  18. 特定版本功能
  19. 1、长接瞄准键,出来鼠标的功能帮忙去掉
  20. 2、在初始状态下,就装备上五倍射程卡和二倍瞄准镜
  21. 3、将60寸,2.5米的5倍数更改为60寸,1.5米的3倍数
  22. 4、进入游戏时,默认加开启射程卡
  23. */
  24. public static bool SpecialVersion1 = true;
  25. //需要App商店审核?-标记用于特别处理某些功能
  26. public static bool needToExamine = false;
  27. //是否属于发布版本?-标记用于特别处理某些功能,比如屏蔽内部测试才有功能
  28. public static bool isReleaseVersion = false;
  29. //设备方案
  30. public static int devicePlan = 3;
  31. /**环数精度小数位 */
  32. public static readonly int ringsPrecision = 1;
  33. /**箭的速度精度小数位 */
  34. public static readonly int arrowSpeedPrecision = 1;
  35. //实体模具箭重,单位克
  36. public static float arrowWeight = 75;
  37. public enum ServerType {LocalTest, Produce};
  38. private static ServerType serverType = ServerType.Produce;
  39. //网关服务器访问地址
  40. public static string gateServerURL {
  41. get {
  42. if (serverType == ServerType.LocalTest) {
  43. return "http://192.168.137.1:11332/SmartBowBusinessServer";
  44. }
  45. if (serverType == ServerType.Produce) {
  46. return "http://43.132.127.96/SmartBowBusinessServer";
  47. }
  48. return "";
  49. }
  50. }
  51. //业务服务端WS访问地址
  52. public static string businessServerWsURL;
  53. //游戏对战服务器
  54. public static string gamePKServerWsURL;
  55. public static int serverIndex
  56. {
  57. get => ServerIndexes[Array.IndexOf(AppNames, Application.productName)];
  58. }
  59. }