Whats the shortest way to put these codes? Just trying to shorten my scripts because I have a lot of these examples throughout my scripts. Is there a way to use no var? Thank you
var randomNumber = Random.Range(0,2);
if (randomNumber==0) {
//blah
}
else {
//bleh
}
and this?
var randomNumber = Random.Range(0,3);
if (randomNumber==0) {
//blah
}
else if (randomNumber==1) {
//bleh
}
else {
//bluh
}