BulletData.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. //------------------------------------------------------------
  2. // Game Framework
  3. // Copyright © 2013-2021 Jiang Yin. All rights reserved.
  4. // Homepage: https://gameframework.cn/
  5. // Feedback: mailto:ellan@gameframework.cn
  6. //------------------------------------------------------------
  7. using System;
  8. using UnityEngine;
  9. namespace MetaClient
  10. {
  11. [Serializable]
  12. public class BulletData : EntityData
  13. {
  14. [SerializeField]
  15. private int m_OwnerId = 0;
  16. [SerializeField]
  17. private CampType m_OwnerCamp = CampType.Unknown;
  18. [SerializeField]
  19. private int m_Attack = 0;
  20. [SerializeField]
  21. private float m_Speed = 0f;
  22. public BulletData(int entityId, int typeId, int ownerId, CampType ownerCamp, int attack, float speed)
  23. : base(entityId, typeId)
  24. {
  25. m_OwnerId = ownerId;
  26. m_OwnerCamp = ownerCamp;
  27. m_Attack = attack;
  28. m_Speed = speed;
  29. }
  30. public int OwnerId
  31. {
  32. get
  33. {
  34. return m_OwnerId;
  35. }
  36. }
  37. public CampType OwnerCamp
  38. {
  39. get
  40. {
  41. return m_OwnerCamp;
  42. }
  43. }
  44. public int Attack
  45. {
  46. get
  47. {
  48. return m_Attack;
  49. }
  50. }
  51. public float Speed
  52. {
  53. get
  54. {
  55. return m_Speed;
  56. }
  57. }
  58. }
  59. }