So, I am trying to create a matrix program with "rainy green code". Everything went well until I decided to drop all instances of the rows into the list and extract / update it. To achieve the proper effect, I need to randomize several things.
All lines are created and saved in the list that you see here in a for loop. Random numbers with intervals and random drops change how quickly the line falls and how fast individual characters rotate through the sprite sheet.
For some reason, although I just get the text that drops right away and all the sprites rotate the same way. Classes and their corresponding functions work ... so the question is what am I doing wrong with my initialization of random numbers?
for (int i = 0; i < (wWidth / 30); i++) { Random random = new Random(new System.DateTime().Millisecond); float randInterval = NextFloat(random); int dropSpeed = random.Next(1, 7); _msList.Add(new MatrixString(chinese, randInterval, dropSpeed, dropSpeed, 1.0f, xOff, 10)); xOff = i * 32; }
source share