Question by
importguru88 · Nov 18, 2015 at 08:41 PM ·
strange iocpointshow-tosetscoring
How to set a score limit
I am making a survival game. The player have to at least score 500 point or more and if the player don't score at 500 points the level restart. How do I script that in c sharp.
Comment
Answer by Soos621 · Nov 18, 2015 at 08:46 PM
private int score;
public void AddToScore (int addedAmount){
score += addedAmount;
}
public bool CheckScoreAmount (){
bool canContinue;
if(score < 500){
canContinue = false;
} else {
canContinue = true;
}
}
Your answer
![](https://koobas.hobune.stream/wayback/20220612045601im_/https://answers.unity.com/themes/thub/images/avi.jpg)