ThrusterData.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 GameFramework.DataTable;
  8. using System;
  9. using UnityEngine;
  10. namespace MetaClient
  11. {
  12. [Serializable]
  13. public class ThrusterData : AccessoryObjectData
  14. {
  15. [SerializeField]
  16. private float m_Speed = 0f;
  17. public ThrusterData(int entityId, int typeId, int ownerId, CampType ownerCamp)
  18. : base(entityId, typeId, ownerId, ownerCamp)
  19. {
  20. IDataTable<DRThruster> dtThruster = GameEntry.DataTable.GetDataTable<DRThruster>();
  21. DRThruster drThruster = dtThruster.GetDataRow(TypeId);
  22. if (drThruster == null)
  23. {
  24. return;
  25. }
  26. m_Speed = drThruster.Speed;
  27. }
  28. /// <summary>
  29. /// 速度。
  30. /// </summary>
  31. public float Speed
  32. {
  33. get
  34. {
  35. return m_Speed;
  36. }
  37. }
  38. }
  39. }