10

Sprite-visual object (actor on the stage) Scripts- Tells actors (sprites) what to do

Embed Size (px)

Citation preview

Page 1: Sprite-visual object (actor on the stage) Scripts- Tells actors (sprites) what to do
Page 2: Sprite-visual object (actor on the stage) Scripts- Tells actors (sprites) what to do

Sprite-visual object (actor on the stage)

Scripts- Tells actors (sprites) what to do

Page 3: Sprite-visual object (actor on the stage) Scripts- Tells actors (sprites) what to do

The Scratch stage is 480 pixels wide and 360 pixels high.

-180

0,0at the center of the stage

Moving right increases the x valueMoving left decreases the x value

180

240-240

Page 4: Sprite-visual object (actor on the stage) Scripts- Tells actors (sprites) what to do

Responding to user actions like mouse clicks and key presses

Example: We programmed the witch to move with the

arrow keys

Page 5: Sprite-visual object (actor on the stage) Scripts- Tells actors (sprites) what to do

One block is executed after the other block in order from top to bottom.

Example:

Page 6: Sprite-visual object (actor on the stage) Scripts- Tells actors (sprites) what to do

Things can happen at the same time

Page 7: Sprite-visual object (actor on the stage) Scripts- Tells actors (sprites) what to do

When we want something to repeat or continue to do something over and over.

We could use LOTS of blocks over and over

OR use a loop or iteration (repeat something)

Example:Forever block

Page 8: Sprite-visual object (actor on the stage) Scripts- Tells actors (sprites) what to do

We want to track something and want the value to change or vary

Example: Create a variable

Page 9: Sprite-visual object (actor on the stage) Scripts- Tells actors (sprites) what to do

When we want something to happen IF something is true

Called an IF statement or Conditional Example:

Page 10: Sprite-visual object (actor on the stage) Scripts- Tells actors (sprites) what to do

Must have at least one of each:SpriteEvent handlingSequential executionParallel executionLoopVariableConditionalSoundText Instructions on how to play the game at the

beginning