ConfigManager.ConfigData.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. using System.Runtime.InteropServices;
  8. namespace GameFramework.Config
  9. {
  10. internal sealed partial class ConfigManager : GameFrameworkModule, IConfigManager
  11. {
  12. [StructLayout(LayoutKind.Auto)]
  13. private struct ConfigData
  14. {
  15. private readonly bool m_BoolValue;
  16. private readonly int m_IntValue;
  17. private readonly float m_FloatValue;
  18. private readonly string m_StringValue;
  19. public ConfigData(bool boolValue, int intValue, float floatValue, string stringValue)
  20. {
  21. m_BoolValue = boolValue;
  22. m_IntValue = intValue;
  23. m_FloatValue = floatValue;
  24. m_StringValue = stringValue;
  25. }
  26. public bool BoolValue
  27. {
  28. get
  29. {
  30. return m_BoolValue;
  31. }
  32. }
  33. public int IntValue
  34. {
  35. get
  36. {
  37. return m_IntValue;
  38. }
  39. }
  40. public float FloatValue
  41. {
  42. get
  43. {
  44. return m_FloatValue;
  45. }
  46. }
  47. public string StringValue
  48. {
  49. get
  50. {
  51. return m_StringValue;
  52. }
  53. }
  54. }
  55. }
  56. }