Exemplo n.º 1
0
    public virtual void GetDamage(int damage)
    {
        float damageBase = 1f;

        foreach (Buff buff in buffManager.Buffs)
        {
            if (buff.name.Equals("脆弱"))
            {
                damageBase += 0.2f;
            }
        }

        int tmp = hpCurrent;

        tmp -= (int)(damage * damageBase);

        hpCurrent = tmp < 0 ? 0 : tmp;

        buffManager.BuffProcess(BuffType.GetHurt, this);
    }