CommonConfig.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 bool needToExamine = false;
  9. //是否属于发布版本?-标记用于特别处理某些功能,比如屏蔽内部测试才有功能
  10. public static bool isReleaseVersion = false;
  11. /**环数精度小数位 */
  12. public static readonly int ringsPrecision = 1;
  13. /**箭的速度精度小数位 */
  14. public static readonly int arrowSpeedPrecision = 1;
  15. //实体模具箭重,单位克
  16. public static float arrowWeight = 75;
  17. public enum ServerType {LocalTest, Produce};
  18. private static ServerType serverType = ServerType.Produce;
  19. //业务服务端访问地址
  20. public static string businessServerURI {
  21. get {
  22. if (serverType == ServerType.LocalTest) {
  23. return "http://192.168.137.1:11332/SmartBowBusinessServer";
  24. }
  25. if (serverType == ServerType.Produce) {
  26. return "http://49.234.219.63:11332/SmartBowBusinessServer";
  27. }
  28. return "";
  29. }
  30. }
  31. //业务服务端WS访问地址
  32. public static string businessServerWsURI {
  33. get {
  34. if (serverType == ServerType.LocalTest) {
  35. return "ws://192.168.137.1:11333/SmartBowBusinessServerSK";
  36. }
  37. if (serverType == ServerType.Produce) {
  38. return "ws://49.234.219.63:11333/SmartBowBusinessServerSK";
  39. }
  40. return "";
  41. }
  42. }
  43. //游戏对战服务器
  44. public static string gamePKServerWsURI {
  45. get {
  46. if (serverType == ServerType.LocalTest) {
  47. return "ws://192.168.137.1:11811/SmartBowGameServer";
  48. }
  49. if (serverType == ServerType.Produce) {
  50. return "ws://49.234.219.63:11811/SmartBowGameServer";
  51. }
  52. return "";
  53. }
  54. }
  55. }