Summer Charity Class/Scratch Learning/2.1 Parkour (1)

2020-07-30 23:50:22 0 Comment 2352 views
abstract

Video learning address: https://adacode.net/topic/128 How to Play Parkour Game Parkour is a very classic 2D game. In the game, Ada can jump up and squ

Summer Charity Class/Scratch Learning/2.1 Parkour (1)

Video learning address:https:/ /adacode.net/topic/128

  1. How to play parkour games

Summer Charity Class/Scratch Learning/2.1 Parkour (1)

Parkour is a very classic 2D game. In the game, Ada can jump and squat to avoid obstacles. At the same time Increase the score by eating gold coins. Through this game, we can learn the building blocks of sports and appearance groups in detail.

  1. Ada runs upAda is a character, how can he run? We clicked on the shape tab and found that Ada has four shapes. So what is styling? We all have many sets of clothes, and each change of clothes. We changed an image. Scratch's look is just like changing our clothes. It can have many images.

    Summer Charity Class/Scratch Learning/2.1 Parkour (1)

    There is one in the appearance group Next lookBuilding block. Click on this building block Ada to change the look. We are findingRepeat executionBuilding blocksNext shape Eat the building blocks. Ada has a running animation.

  2. Mobile Ada

    Summer Charity Class/Scratch Learning/2.1 Parkour (1)

Now Ada is still on the stage If it doesn’t move, we use the moving 10 steps blocks in the move group to make Ada move stand up. In order to prevent Ada from running so fast, we add another pause for 1 second 1 is changed to 0.05. At this time, Ada can run smoothly.

  1. Stage edge verificationAfter Ada ran to the right side of the stage, he was blocked and would not look back. Let's realize the effect of Ada hitting the south wall and turning around.

    Summer Charity Class/Scratch Learning/2.1 Parkour (1)

First of all, every time Ada moves, we have to judge whether Ada currently touches the edge of the stage. This uses the control groupIf...thenBuilding block. This building block is similar to repeated execution. But there is a diamond-shaped condition .Find in the detection groupTotouch the mouse pointer put the building block in this diamond, click the down arrow tomouse pointerchangeedge of stage .

  1. Ada’s positionAfter Ada hits the edge of the stage, he must go back Go to the left side of the stage. There is a move to x,y block in the move group. Thisx,y represents Ada’s position on the stage. Try to drag Ada with the mouse, you can find the next to Ada’s characterx,y is always changing. This changing number represents Ada's position.


Summer Charity Class/Scratch Learning/2.1 Parkour (1)

We drag Ada to the left side of the stage, At this timemove to x,yThe number in the building block represents that Ada is on the left side of the stage Side position. We put this block insideif...then .Ada can move along the stage repeatedly.

Okay, that’s all for this lesson. See you in the next lesson!


  • A+
Classification: game
avatar