Hello,
i have this script which count every object that my player collect
i need to modify my script with if function maybe.
So when my player collect 10 object - to Shows on my screen “You Win”
Can anyone help me please?
Thank you
static var score:int=0; //store the score
var scoreTxt : GUIText;
function updateScore(val : int)
{
score= score + val;
}
function Update ()
{
scoreTxt.text="Score: " + score;
}