Beispiel #1
0
    public void GiveDamage(int damage)
    {
        if (unTouchble == true)
        {
            return;
        }

        health -= damage;
        healthBar.SetHealth(health);

        if (health < 1)
        {
            unTouchble = true;
            animator.SetTrigger("Dead");
        }
        else if (health < 150)
        {
            animator.SetBool("Enrage", true);
        }
    }