Therefore, drag and drop the forever block from the Control palette. Whatever we write next must execute continuously.Drag and drop the set my variable to () block below the go to x () y () block and select Score from its drop-down set its value as 0.For that, go to the Variables palette and click on Make a Variable a dialogue box will appear. We will make a variable to keep track of the number of fish the shark eats.To set initial position, drag and drop the go to x () y () block and set x and y to 0 this will set the center of the Stage as the shark’s initial position.Drag and drop the set size to () % block from the Looks palette to adjust the shark’s size.Drag and drop the when flag clicked block to scripting area from the Events palette.Then, choose it as your board and select the appropriate port from the Connect menu. Connect evive to your computer and open PictoBlox.Assigning Movements to Sharkįollow the steps below to write the script: Open the sprite library as we did in the previous chapter and choose the fish and Shark2 sprites. In this shark eating game, we need two sprites: the shark and the fish. Therefore, choose any of the underwater backdrops from PictoBlox’s backdrop library. Since we have a shark and a lot of fish in our game, our background should be a suitable environment for them.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |