Example #1
0
        //解除装甲数据
        public void DetachArmorData(ArmorData armorData)
        {
            if (armorData == null)
            {
                return;
            }

            AllArmorData.Remove(armorData);
            RefreshData();
        }
        public override void OnShow(object userData)
        {
            base.OnShow(userData);
            //装甲数据
            m_ArmorData = userData as ArmorData;
            if (m_ArmorData == null)
            {
                HotLog.Error("Armor data is invalid.");
                return;
            }

            //绑定到拥有者实体上
            GameEntry.Entity.AttachEntity(this, m_ArmorData.OwnerId, AttachPointName);
        }
Example #3
0
        //附加装甲数据
        public void AttachArmorData(ArmorData armorData)
        {
            if (armorData == null)
            {
                return;
            }

            if (AllArmorData.Contains(armorData))
            {
                return;
            }

            AllArmorData.Add(armorData);
            RefreshData();      //刷新数据
        }
 //显示装甲实体
 public static void ShowArmor(this EntityComponent entityComponent, ArmorData data)
 {
     entityComponent.ShowEntity(typeof(Armor), "Armor", Constant.AssetPriority.ArmorAsset, data);
 }