예제 #1
0
        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}");
        }
예제 #2
0
        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();
            }
        }