public TankData(int entityId, int typeId, CampType camp, string tankId) : base(entityId, typeId, camp) { IDataTable <DRTank> dtTank = GameEntry.DataTable.GetDataTable <DRTank>(); DRTank drTank = dtTank.GetDataRow(TypeId); if (drTank == null) { return; } m_ThrusterData = new ThrusterData(GameEntry.Entity.GenerateSerialId(), drTank.ThrusterId, Id, Camp); m_WeaponData = new WeaponData(GameEntry.Entity.GenerateSerialId(), drTank.WeaponId, Id, Camp); m_ArmorData = new ArmorData(GameEntry.Entity.GenerateSerialId(), drTank.ArmorId, Id, Camp); m_DeadEffectId = drTank.DeadEffectId; m_DeadSoundId = drTank.DeadSoundId; m_TankColor = drTank.TankColor; HP = m_ArmorData.MaxHP; m_Defense = m_ArmorData.Defense; m_TankId = tankId; }
public static void ShowThruster(this EntityComponent entityComponent, ThrusterData data) { entityComponent.ShowEntity(typeof(Thruster), "Thruster", Constant.AssetPriority.ThrusterAsset, data); }