The velocity blocks (velocityX
and velocityY
), tell sprites how fast to move in a particular direction, just as the counter pattern did before. By hiding the counter pattern code inside a block, you can build even more complex programs.
The code that uses the counter pattern is on the left, and the code that uses the velocity blocks is on the right.
Found a bug in the documentation? Let us know at documentation@code.org