Random Choose a List if it has a count more than 0
Hi short question,
i have 10 Lists with different ints inside. My Player can add some "cards" to this list so that he gets stronger. To the beginning of the game i want to randomly choose one of these 10 Lists "to be active".
Right now i made it super simple with :
public void CreatWarii()
{
warriNummer = Random.Range(0, 11);
mainMenü.SetActive(false);
wariiMenü.SetActive(true);
Debug.Log(warriNummer);
wariiImage.sprite = wariiGotchis[warriNummer];
//SceneManager.LoadScene(1);
}
Works fine but the problem is there is no connection to my lists right now. I wanna check first if , the random rolls a 7 for example, the list 7 has atleat a 1 inside.
Any tipps?
Your answer
Follow this Question
Related Questions
Help needed on Space Shooter Tutorial (PlayerObject movement) 0 Answers
How to make a street on a procedural terrain? 0 Answers
Using Destroying Objects in a List of Gameobjects - argument out of range. 0 Answers
Screen changes color when object is selected 1 Answer
how can i make my player look where he is moving with this code setup 0 Answers