Example #1
0
    public void ReduceHealth()
    {
        if (health > 0)
        {
            health--;
            if (health <= 0)
            {
                purse.IncreaseCoins(gameObject.name);

                Destroy(gameObject);
            }
        }
    }