Example #1
0
    public void AddDamage(int amount)
    {
        health -= amount;
        StartCoroutine("VisualFeedBack");

        if (health <= 0)
        {
            if (player)
            {
                player.AddScore(deadPoints);
            }
            Dead();
        }
    }