CommonConfig.cs 2.4 KB

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