Version.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //------------------------------------------------------------
  2. // Game Framework
  3. // Copyright © 2013-2021 loyalsoft. All rights reserved.
  4. // Homepage: http://www.game7000.com/
  5. // Feedback: http://www.game7000.com/
  6. //------------------------------------------------------------
  7. namespace GameFramework
  8. {
  9. /// <summary>
  10. /// 版本号类。
  11. /// </summary>
  12. public static partial class Version
  13. {
  14. private const string GameFrameworkVersionString = "2021.05.31";
  15. private static IVersionHelper s_VersionHelper = null;
  16. /// <summary>
  17. /// 获取游戏框架版本号。
  18. /// </summary>
  19. public static string GameFrameworkVersion
  20. {
  21. get
  22. {
  23. return GameFrameworkVersionString;
  24. }
  25. }
  26. /// <summary>
  27. /// 获取游戏版本号。
  28. /// </summary>
  29. public static string GameVersion
  30. {
  31. get
  32. {
  33. if (s_VersionHelper == null)
  34. {
  35. return string.Empty;
  36. }
  37. return s_VersionHelper.GameVersion;
  38. }
  39. }
  40. /// <summary>
  41. /// 获取内部游戏版本号。
  42. /// </summary>
  43. public static int InternalGameVersion
  44. {
  45. get
  46. {
  47. if (s_VersionHelper == null)
  48. {
  49. return 0;
  50. }
  51. return s_VersionHelper.InternalGameVersion;
  52. }
  53. }
  54. /// <summary>
  55. /// 设置版本号辅助器。
  56. /// </summary>
  57. /// <param name="versionHelper">要设置的版本号辅助器。</param>
  58. public static void SetVersionHelper(IVersionHelper versionHelper)
  59. {
  60. s_VersionHelper = versionHelper;
  61. }
  62. }
  63. }