protected internal override void OnShow(object userData) #endif { base.OnShow(userData); m_AircraftData = userData as AircraftData; if (m_AircraftData == null) { Log.Error("Aircraft data is invalid."); return; } Name = Utility.Text.Format("Aircraft ({0})", Id.ToString()); GameEntry.Entity.ShowThruster(m_AircraftData.GetThrusterData()); List <WeaponData> weaponDatas = m_AircraftData.GetAllWeaponDatas(); for (int i = 0; i < weaponDatas.Count; i++) { GameEntry.Entity.ShowWeapon(weaponDatas[i]); } List <ArmorData> armorDatas = m_AircraftData.GetAllArmorDatas(); for (int i = 0; i < armorDatas.Count; i++) { GameEntry.Entity.ShowArmor(armorDatas[i]); } }
public static void ShowAircraft(this EntityComponent entityComponent, AircraftData data) { entityComponent.ShowEntity(typeof(Aircraft), "Aircraft", Constant.AssetPriority.AircraftAsset, data); }