Пример #1
0
        //计算被攻击后的生命值
        public void GetRemainHp(ICharactor theAttacker)
        {
            //获取攻击者的攻击力
            int atkValue = theAttacker.GetAtkValue();

            //减少伤害值
            atkValue -= _attrStrategy.GetDmgDesValue(this);
            //计算生命值
            _nowHp -= atkValue;
        }