Exemple #1
0
    public void setScoreBoard(int currentScore)
    {
        print("currScore: " + player.getCurrScore());
        totalScore     = totalScore + currentScore;
        textScore.text = totalScore.ToString();

        /* The reason for doing it like this is when you want to change a color,
         * you first make a copy of the colors properties so after you've changed the
         * copy you need to set the new color to the copy's color. You can't change
         * the color directly
         *
         * Renderer myRenderer = GetComponent<Renderer>();
         * Color col = myRenderer.material.color;
         * col.a = 0.25f;
         * myRenderer.material.color = col;*/
    }