number -= penalty;
if (number < 0) { number = 0; }
textNumber = number;
if(number>0)
{//lose}
j2graves wrote:In my game, when you get hurt and lose coins, the score decreases by 10. if the score is less than 10, it will become negative numbers. how can I make it stop at zero?
if(score<=0)
{
score=0;
}
Users browsing this forum: No registered users and 1 guest