Page 60 - Computer_Genius_v2.1_C7_flipbook
P. 60

15   Drag  the  change  by  block
                                                                                from  the  Variables  blocks
                                                                                category and drop it below the
                                                                                splash block.











                                                                                        17   Click on the A button
                                                                                       in the Game Controls to
                                                                                       view  the  output  of  next
                                                                                       iteration  of  the  repeat
                                                                                       loop.







                          16  Click on the Start the simulator button
                          in the Simulator toolbar to start the game.

















                                                                     18  Click on the A button 8 times
                                                                     in  the  Game Controls to  view
                                                                     the output of last iteration of the
                                                                     repeat loop.





                  Forever Loop

                  The forever loop is a special loop that runs continuously throughout the entire project. It is often
                  used  for  actions  that  need  to  happen  repeatedly without  stopping, such  as  updating  the  score,
                  checking for collisions, or moving a sprite.
                  Let us create a project in MakeCode Arcade that demonstrates the use of forever block to scale the
                  sprite.


                       58    Computer Genius (V2.1)-VII
   55   56   57   58   59   60   61   62   63   64   65