Hello guys,
I have one problem, i build one game, and for example, we have one string array:
string[] words = {"one word", "seconds word", "third word", "fourth word ..."};
i want to select randomly word in this array using Random class, but when i use this method:
public string GetWord()
{
return words[random.Next(words.Length)];
}
and secondly i want do draw it, like spriteBatch.DrawString(spriteFont, GetWord(), new Vector2(0, 0), Color.White)
it makes me to cry ... it selected random words, but random word in every screen ...
Could you give me an advice, how can i fix it? I want to select randomly string, and words will changing when one object intersects with other object.
Thanks very much for advice
Marek