20.03.2013 Views

Introduction to Computer Science with Scratch and App Inventor

Introduction to Computer Science with Scratch and App Inventor

Introduction to Computer Science with Scratch and App Inventor

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Now I can modify my script so that my dinosaur always faces the same direction he is moving. I will do<br />

this using the switch <strong>to</strong> costume block from the looks menu. The looks menu (purple blocks) contains<br />

actions that let us control how the appearance of our sprite changes during a program.<br />

Changing Your Sprite’s Looks<br />

To change the costume of our sprite, we used a block from the looks menu. The looks menu contains<br />

blocks that change things like the color <strong>and</strong> size of your sprite.<br />

Try out different looks blocks <strong>and</strong> see<br />

what happens. This simple example<br />

shows a change color effect block. Now<br />

the dinosaur will cycle through color<br />

changes every second.<br />

Now, when the right arrow is pressed, our sprite<br />

will face <strong>to</strong> the right <strong>and</strong> move <strong>to</strong> the right<br />

When the left arrow is pressed, the sprite will face<br />

<strong>to</strong> the left <strong>and</strong> move <strong>to</strong> the left.<br />

The looks blocks are the dark purple blocks.<br />

mbrace Game Development Workbook Page 16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!