Esempio n. 1
0
    void ColorizeButton()
    {
        if (selectedDefender)
        {
            Defender defender = selectedDefender.GetComponent <Defender>();

            if (star.EnoughStarsFor(defender.price) == Stars.Status.ENOUGH_STARS)
            {
                GetComponent <SpriteRenderer> ().color = COLOR_ACTIVATED;
            }
            else
            {
                GetComponent <SpriteRenderer> ().color = COLOR_ACTIVATED_NOT_ENOUGH_STARS;
            }
        }
    }