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 = string.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]); } }
protected override void OnShow(object userData) { base.OnShow(userData); bg sceneBackground = FindObjectOfType <bg>(); if (sceneBackground == null) { Debug.LogWarning("Can not find scene background."); return; } data = userData as AircraftData; if (data == null) { Debug.LogError("Aircraft data is invalid."); return; } m_PlayerMoveBoundary = new Rect(sceneBackground.PlayerMoveBoundary.bounds.min.x, sceneBackground.PlayerMoveBoundary.bounds.min.z, sceneBackground.PlayerMoveBoundary.bounds.size.x, sceneBackground.PlayerMoveBoundary.bounds.size.z); }
public static void ShowAircraft(this EntityComponent entityComponent, AircraftData data) { entityComponent.ShowEntity(typeof(Aircraft), "Aircraft", Constant.AssetPriority.AircraftAsset, data); }
public static void ShowAircraft(this EntityComponent entityComponent, AircraftData data) { entityComponent.ShowEntity(typeof(Aircraft), "Aircraft", data); }