Example #1
0
    public void OnMouseDown()
    {
        life--;

        if (life > 0)
        {
            soundScript.playSmallPop();
            Instantiate(splash, transform.position, Quaternion.identity);
        }

        transform.localScale = new Vector2(transform.localScale.x - 0.2f, transform.localScale.y - 0.2f);
        scoreScript.clicks--;
        scoreScript.clickstxt.text = "Clicks " + scoreScript.clicks.ToString();
    }