CommonConfig.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. /**通用配置(2021/12/18新增) */
  5. public class CommonConfig
  6. {
  7. public static bool isReleaseVersion = true;
  8. /**环数精度小数位 */
  9. public static readonly int ringsPrecision = 1;
  10. /**箭的速度精度小数位 */
  11. public static readonly int arrowSpeedPrecision = 1;
  12. //实体模具箭重,单位克
  13. public static float arrowWeight = 75;
  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. }