samedi 14 septembre 2019

Random.Range without repeating numbers

I'm trying to make an application that picks a random sentance from a string, without them repeating.

i've tried to put the random numbers in a list, and then reroll it if the number is already in the list.

    string myString = Sentance[Random.Range(0, Sentance.Length)];
    GameChat.text = myString;




Aucun commentaire:

Enregistrer un commentaire