EntityManager.ShowEntityInfo.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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.Entity
  8. {
  9. internal sealed partial class EntityManager : GameFrameworkModule, IEntityManager
  10. {
  11. private sealed class ShowEntityInfo : IReference
  12. {
  13. private int m_SerialId;
  14. private int m_EntityId;
  15. private EntityGroup m_EntityGroup;
  16. private object m_UserData;
  17. public ShowEntityInfo()
  18. {
  19. m_SerialId = 0;
  20. m_EntityId = 0;
  21. m_EntityGroup = null;
  22. m_UserData = null;
  23. }
  24. public int SerialId
  25. {
  26. get
  27. {
  28. return m_SerialId;
  29. }
  30. }
  31. public int EntityId
  32. {
  33. get
  34. {
  35. return m_EntityId;
  36. }
  37. }
  38. public EntityGroup EntityGroup
  39. {
  40. get
  41. {
  42. return m_EntityGroup;
  43. }
  44. }
  45. public object UserData
  46. {
  47. get
  48. {
  49. return m_UserData;
  50. }
  51. }
  52. public static ShowEntityInfo Create(int serialId, int entityId, EntityGroup entityGroup, object userData)
  53. {
  54. ShowEntityInfo showEntityInfo = ReferencePool.Acquire<ShowEntityInfo>();
  55. showEntityInfo.m_SerialId = serialId;
  56. showEntityInfo.m_EntityId = entityId;
  57. showEntityInfo.m_EntityGroup = entityGroup;
  58. showEntityInfo.m_UserData = userData;
  59. return showEntityInfo;
  60. }
  61. public void Clear()
  62. {
  63. m_SerialId = 0;
  64. m_EntityId = 0;
  65. m_EntityGroup = null;
  66. m_UserData = null;
  67. }
  68. }
  69. }
  70. }