CommonConfig.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. /**通用配置(2021/12/18新增) */
  5. public class CommonConfig
  6. {
  7. //App初始语言设置
  8. public static readonly int AppLanguage = 1;
  9. public static bool ReleaseVersion2 = true;
  10. /*
  11. 特定版本功能
  12. 1、长接瞄准键,出来鼠标的功能帮忙去掉
  13. 2、在初始状态下,就装备上五倍射程卡和二倍瞄准镜
  14. 3、将60寸,2.5米的5倍数更改为60寸,1.5米的3倍数
  15. 4、进入游戏时,默认加开启射程卡
  16. */
  17. public static bool SpecialVersion1 = true;
  18. //需要App商店审核?-标记用于特别处理某些功能
  19. public static bool needToExamine = false;
  20. //是否属于发布版本?-标记用于特别处理某些功能,比如屏蔽内部测试才有功能
  21. public static bool isReleaseVersion = false;
  22. //设备方案
  23. public static readonly int devicePlan = 3;
  24. /**环数精度小数位 */
  25. public static readonly int ringsPrecision = 1;
  26. /**箭的速度精度小数位 */
  27. public static readonly int arrowSpeedPrecision = 1;
  28. //实体模具箭重,单位克
  29. public static float arrowWeight = 75;
  30. public enum ServerType {LocalTest, Produce};
  31. private static ServerType serverType = ServerType.Produce;
  32. //业务服务端访问地址
  33. public static string businessServerURI {
  34. get {
  35. if (serverType == ServerType.LocalTest) {
  36. return "http://192.168.137.1:11332/SmartBowBusinessServer";
  37. }
  38. if (serverType == ServerType.Produce) {
  39. return "https://xmjssvr.cn/SmartBowBusinessServer";
  40. }
  41. return "";
  42. }
  43. }
  44. //业务服务端WS访问地址
  45. public static string businessServerWsURI {
  46. get {
  47. if (serverType == ServerType.LocalTest) {
  48. return "ws://192.168.137.1:11333/SmartBowBusinessServerSK";
  49. }
  50. if (serverType == ServerType.Produce) {
  51. return "wss://xmjssvr.cn/SmartBowBusinessServerSK";
  52. }
  53. return "";
  54. }
  55. }
  56. //游戏对战服务器
  57. public static string gamePKServerWsURI {
  58. get {
  59. if (serverType == ServerType.LocalTest) {
  60. return "ws://192.168.137.1:11811/SmartBowGameServer";
  61. }
  62. if (serverType == ServerType.Produce) {
  63. return "wss://xmjssvr.cn/SmartBowGameServer";
  64. }
  65. return "";
  66. }
  67. }
  68. }