public override void OnUse(AbstractCharactor user, AbstractCharactor reciver, AbstractCard thisCard) { Buff_Armor armor = user.GetBuff <Buff_Armor>(); armor.Amount += 5; Model.Log.Debug($"{user?.Name} add 5 armor,Now Armor:{armor.Amount}"); }
public void Fresh() { SetMaxHp(charactor.MaxHp); SetHp(charactor.NowHp); ArmorController.selectedIndex = charactor.GetBuff <Buff_Armor>().Amount > 0 ? 0 : 1; //GHpBar.text = $"{charactor.NowHp}/{charactor.MaxHp}"; //GHpBar.GetChild("Block").text = charactor.GetBuff<Buff_Armor>().Amount.ToString(); buffList.RemoveChildrenToPool(); foreach (var buff in charactor.GetBuffs()) { GComponent g = buffList.AddItemFromPool().asCom; g.icon = buff.Icon; g.text = buff.Amount == 0 ? "" : buff.Amount.ToString(); } }