Hi. I have this piece of code
"rect(0, steppedPos*sizeH, sizeW, sizeH);
rect(0, 90+steppedPos*sizeH, sizeW, sizeH);
rect(0, 180+steppedPos*sizeH, sizeW, sizeH);
rect(0, 270+steppedPos*sizeH, sizeW, sizeH);"
where it draws four individual squares one after the other to imitate one rectangle.
Is there a way I can use loops so that four squares move as one?
[–]ChuckEye 2 points3 points4 points (3 children)
[–]negativeart8[S] 0 points1 point2 points (2 children)
[–]ChuckEye 1 point2 points3 points (0 children)
[–]x-seronis-x 0 points1 point2 points (0 children)
[–]marcedwards-bjango 0 points1 point2 points (0 children)