예제 #1
0
        protected internal override void OnShow(object userData)
        {
            base.OnShow(userData);
            Log.Info("Show Entity");
            m_EntityData = userData as EntityDemoData;
            if (m_EntityData == null)
            {
                Log.Error("不能获取到测试实体的数据信息。");
                return;
            }
            //初始化拥有的武器,护甲,等信息
            var weapons = m_EntityData.GetAllWeaponDatas();

            for (int i = 0; i < weapons.Count; i++)
            {
                GameEntry.Entity.ShowWeapon(weapons[i]);
            }
            var armors = m_EntityData.GetAllArmorDatas();

            for (int i = 0; i < armors.Count; i++)
            {
                GameEntry.Entity.ShowArmor(armors[i]);
            }
            GameEntry.Entity.ShowThruster(m_EntityData.GetThrusterData());
        }
예제 #2
0
 /// <summary>
 /// 创建FSMdemo中实体的拓展方法
 /// </summary>
 /// <param name="entityComponent"></param>
 /// <param name=""></param>
 public static void ShowFsmDemoEntity(this EntityComponent entityComponent, EntityDemoData data)
 {
     entityComponent.ShowEntity(typeof(EntityDemo), "FsmEntityGroup", Constant.AssetPriority.MyAircraftAsset, data);
 }