コード例 #1
0
ファイル: Aircraft.cs プロジェクト: liufeng420/BasketballRash
        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]);
            }
        }
コード例 #2
0
 public static void ShowAircraft(this EntityComponent entityComponent, AircraftData data)
 {
     entityComponent.ShowEntity(typeof(Aircraft), "Aircraft", data);
 }