CommonConfig.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 devicePlan = 0;
  13. /**环数精度小数位 */
  14. public static readonly int ringsPrecision = 1;
  15. /**箭的速度精度小数位 */
  16. public static readonly int arrowSpeedPrecision = 1;
  17. //实体模具箭重,单位克
  18. public static float arrowWeight = 75;
  19. public enum ServerType {LocalTest, Produce};
  20. private static ServerType serverType = ServerType.Produce;
  21. //业务服务端访问地址
  22. public static string businessServerURI {
  23. get {
  24. if (serverType == ServerType.LocalTest) {
  25. return "http://192.168.137.1:11332/SmartBowBusinessServer";
  26. }
  27. if (serverType == ServerType.Produce) {
  28. return "http://49.234.219.63:11332/SmartBowBusinessServer";
  29. }
  30. return "";
  31. }
  32. }
  33. //业务服务端WS访问地址
  34. public static string businessServerWsURI {
  35. get {
  36. if (serverType == ServerType.LocalTest) {
  37. return "ws://192.168.137.1:11333/SmartBowBusinessServerSK";
  38. }
  39. if (serverType == ServerType.Produce) {
  40. return "ws://49.234.219.63:11333/SmartBowBusinessServerSK";
  41. }
  42. return "";
  43. }
  44. }
  45. //游戏对战服务器
  46. public static string gamePKServerWsURI {
  47. get {
  48. if (serverType == ServerType.LocalTest) {
  49. return "ws://192.168.137.1:11811/SmartBowGameServer";
  50. }
  51. if (serverType == ServerType.Produce) {
  52. return "ws://49.234.219.63:11811/SmartBowGameServer";
  53. }
  54. return "";
  55. }
  56. }
  57. }