CommonConfig.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. /**通用配置(2021/12/18新增) */
  5. public class CommonConfig
  6. {
  7. /**环数精度小数位 */
  8. public static readonly int ringsPrecision = 1;
  9. /**箭的速度精度小数位 */
  10. public static readonly int arrowSpeedPrecision = 1;
  11. //实体模具箭重,单位克
  12. public static float arrowWeight = 75;
  13. public static bool isReleaseVersion = true;
  14. public enum ServerType {LocalTest, Produce};
  15. private static ServerType serverType = ServerType.Produce;
  16. //业务服务端访问地址
  17. public static string businessServerURI {
  18. get {
  19. if (serverType == ServerType.LocalTest) {
  20. return "http://192.168.137.1:11332/SmartBowBusinessServer";
  21. }
  22. if (serverType == ServerType.Produce) {
  23. return "http://49.234.219.63:11332/SmartBowBusinessServer";
  24. }
  25. return "";
  26. }
  27. }
  28. //业务服务端WS访问地址
  29. public static string businessServerWsURI {
  30. get {
  31. if (serverType == ServerType.LocalTest) {
  32. return "ws://192.168.137.1:11333/SmartBowBusinessServerSK";
  33. }
  34. if (serverType == ServerType.Produce) {
  35. return "ws://49.234.219.63:11333/SmartBowBusinessServerSK";
  36. }
  37. return "";
  38. }
  39. }
  40. //游戏对战服务器
  41. public static string gamePKServerWsURI {
  42. get {
  43. if (serverType == ServerType.LocalTest) {
  44. return "ws://192.168.137.1:11811/SmartBowGameServer";
  45. }
  46. if (serverType == ServerType.Produce) {
  47. return "ws://49.234.219.63:11811/SmartBowGameServer";
  48. }
  49. return "";
  50. }
  51. }
  52. }