Esempio n. 1
0
        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]);
            }
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public static void ShowAircraft(this EntityComponent entityComponent, AircraftData data)
 {
     entityComponent.ShowEntity(typeof(Aircraft), "Aircraft", Constant.AssetPriority.AircraftAsset, data);
 }
Esempio n. 4
0
 public static void ShowAircraft(this EntityComponent entityComponent, AircraftData data)
 {
     entityComponent.ShowEntity(typeof(Aircraft), "Aircraft", data);
 }