Professional Documents
Culture Documents
Greetings
Activities
Today’s Agenda
Summary/HW
Welcome
Greet each other and share homework!
Task 2: Activity
Task 2: Activity
Recap
Squad recap each concept
discussed in last class.
Discuss responsibilities of a
captain.
Responsibilities Of A Captain
Quick Recap
• Let’s recap all the concepts covered in last class!
• Captain Goes first & tag the next person.
Quick Recap
• Introduction to Motion blocks
• Introduction to Looks blocks
• Using the set image number block
• Creating sprites for obstacles through code
• Integration of If-else logic
Task 2: Activity
Tell me 5
1. Teacher asks question to
students one by one.
Activity: Tell Me 5
Task 2: Activity
2. Some properties of
variables.
1. Collision
detection.
Variables
Recap Question
Can you define the term “Variable” ?
20 coins!
Revision: Variables
Blocks: Variables
Blocks: Motion
Recap Question
Name any three Motion blocks.
20 coins!
Set Speed To
• Set the X or Y value for the sprite's speed to a
particular value.
• If negative value is passed to X then the Sprites
starts from the left edge of the screen and vice
versa.
• If negative value is passed to Y then the Sprites
moves to the top edge of the screen and vice
versa.
Move Sprite To
• Move the sprite to the X and Y location
specified in the block.
© Camp K12 Project 1 | Revision
Mobile App Development | Level 2 | Squad Session 3
Blocks: Motion
Blocks: Looks
Recap Question
Can we change the size of a sprite using the
Looks blocks ?
20 coins!
Revision: Looks
Set Visibility
• Show the selected sprite or hide the selected
sprite on the canvas.
20 coins!
Revision:
Revision:Creating
CreatingSprite
SpriteThrough
ThroughCode
Code
• The create sprite type block adds an instance of the sprite type at
the x and y location specified.
• We can perform any operation with this instance created in the
do block of this component.
20 coins!
Step 4: Inside it, add the ‘remove sprite’ block from the Add &
Remove section and pass the sprite value to the block.
Step 5: Now, add the create Sprite_Type2 block below the remove
block in the event block to create next obstacle when the previous
obstacle is removed. You can copy this block form the click event of
jump button.
Step 1: From the Evets section, select the ‘when Sprite_Type1 collides
with SpriteType2’ block to detect the collision with the obstacle.
Step 2: Inside it, add the ‘stop all sprites on canvas1’ block from the
motion section.
Step 3: To display the game over image, select the ‘show sprite’ block
from the Looks section and set Sprite5 as its value.
Step 4: Now, set the jump button disabled using the ‘set Button1
disabled to true’ block to avoid next obstacles to appear.
Step 1: Select the click event of Sprite_Type from the Events section
and set Sprite_Type5 in it.
Step 2: Insert the ‘move sprite to x and y’ block inside it to move the
Sprite1 mario to its default location i.e. X= 70 and Y= 250.
Step 3: Set the jump button disabled property to false to enable the
jump button.
Step 4: Select two ‘remove sprite’ blocks from the Add & Remove
section and set Sprite_Type1 and Sprite_Type2 in them respectively to
remove all the sprites on the screen.
Step 5: Add the ‘hide sprite5’ block and add it below the remove
block.
Summary
• Collision detection
• Some properties of variables
• Stopping all sprites using motion blocks
• Canvas events blocks
• Adding the scoring functionality
• Adding the jump and game over sounds
Summary
• Let’s summarize all the concepts covered today!
• Take a quiz with your classmates!
• Win the quiz to earn points!
Quiz Link
Home Work
Design:
• Add left-right control buttons.
• Game over and game start button.
• Add enemies and add player object.
• Add fighting component.