We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, i got this sketch
http://studio.sketchpad.cc/sp/pad/view/ro.9N7z1RsE2GxhQ/rev.4
and I want :
Now every frame, all the rows get new random values every time... I want that the upper row passes the values to the lower one..
so it looks like if the circles are falling down...
i think i must use an array but i dont know how to continue,... any ideas ?
Thanks...
is like an led screen...
Inspiration came from here :
http://media-cache-ak0.pinimg.com/736x/58/69/50/58695008b75b11569b07cf3e24bffea9.jpg
Answers
here - the array you describe is a 2D-Array, a field or grid like a chess board.
It consists of cells. Each of them has a position and a size for the circle. When the lines drop, they keep the position but take the circle size of the line above. Since the 1st line (at the top) is then the same as the 2nd, we initialize the 1st line with new random sizes for the circles.
The cells are implemented as a class Cell, so we got all its properties and methods in one place. The 2D-array consists of the cells of that class.
The Code is commented.
Awesome, gonna study it, thanks !!! :)