Ejemplo n.º 1
0
    public void spellDamage(M_Entity other, int spellDamage)
    {
        int dmg = calculateDamage(other.defence, spellDamage);

        other.receiveDamage(dmg);

        if (other.gameObject.tag == "Mob")
        {
            other.HUD.Add("$sp" + (-dmg), Color.red, .1f);
        }
        else if (other.gameObject.tag == "Char")
        {
            other.HUD.Add("$sp" + (-dmg), Color.yellow, .1f);
        }
        else if (other.gameObject.tag == "Boss")
        {
            other.HUD.Add("$sp" + (-dmg), Color.red, .1f);
        }
    }
Ejemplo n.º 2
0
    public virtual void damage(M_Entity other)
    {
        int dmg = calculateDamage(other.defence, attackPower);

        other.receiveDamage(dmg);

        if (other.gameObject.tag == "Mob")
        {
            other.HUD.Add(-dmg, Color.red, .1f);
        }
        else if (other.gameObject.tag == "Char")
        {
            other.HUD.Add(-dmg, Color.yellow, .1f);
        }
        else if (other.gameObject.tag == "Boss")
        {
            other.HUD.Add(-dmg, Color.red, .1f);
        }
    }