I have a variable that raises time for every 500 points of score.
For now I have a code that works perfectly, but I want simplify the code with just 5 or 6 lines, because this is a endless run game and I don´t want do this method with 100 if conditions.
My code is:
if (scoreNum.Equals (500)) {
this.RaiseExtendPlay (60);
extendedplay.extendedSource.Play ();
}
if (scoreNum.Equals (1000)) {
this.RaiseExtendPlay (60);
extendedplay.extendedSource.Play ();
}
if (scoreNum.Equals (1500)) {
this.RaiseExtendPlay (60);
extendedplay.extendedSource.Play ();
}
if (scoreNum.Equals (2000)) {
this.RaiseExtendPlay (60);
extendedplay.extendedSource.Play ();
}