CommonConfig.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 enum ServerType {LocalTest, Produce};
  14. private static ServerType serverType = ServerType.Produce;
  15. //业务服务端访问地址
  16. public static string businessServerURI {
  17. get {
  18. if (serverType == ServerType.LocalTest) {
  19. return "http://192.168.101.14:11332/SmartBowBusinessServer";
  20. }
  21. if (serverType == ServerType.Produce) {
  22. return "http://49.234.219.63:11332/SmartBowBusinessServer";
  23. }
  24. return "";
  25. }
  26. }
  27. //业务服务端WS访问地址
  28. public static string businessServerWsURI {
  29. get {
  30. if (serverType == ServerType.LocalTest) {
  31. return "ws://192.168.101.14:11333/SmartBowBusinessServerSK";
  32. }
  33. if (serverType == ServerType.Produce) {
  34. return "ws://49.234.219.63:11333/SmartBowBusinessServerSK";
  35. }
  36. return "";
  37. }
  38. }
  39. //游戏对战服务器
  40. public static string gamePKServerWsURI {
  41. get {
  42. if (serverType == ServerType.LocalTest) {
  43. return "ws://192.168.101.14:11811/SmartBowGameServer";
  44. }
  45. if (serverType == ServerType.Produce) {
  46. return "ws://49.234.219.63:11811/SmartBowGameServer";
  47. }
  48. return "";
  49. }
  50. }
  51. }