|
9 | 9 |
|
10 | 10 | In this lab, you will use costumes and movement to create simple Snap! animations.
|
11 | 11 |
|
12 |
| -## Part 1 - Run, Spot, Run |
| 12 | +## Part 1: Run, Spot, Run |
13 | 13 |
|
14 |
| -1. In a Snap! project, click on the file menu, then click costumes. Import the costumes "dog2 a" and "dog2 b". |
| 14 | +1.1) In a New Snap! project, click on the file menu, then click costumes. Import the costumes `dog2a` and `dog2b`. |
15 | 15 |
|
16 |
| -  |
| 16 | +1.2) Write a script to make the sprite change costume each time the space bar is pressed. (The sprite should switch back and forth between the two costumes.) |
17 | 17 |
|
18 |
| -  |
| 18 | +1.3) Add to your script so that the sprite will |
19 | 19 |
|
20 |
| -2. Write a script to make the sprite change costume each time the space bar is pressed. The sprite should switch back and forth between the two costumes. |
| 20 | +1. Face to the left. |
| 21 | +2. Move a few steps. |
| 22 | +3. Change costume when the left arrow key is pressed. |
21 | 23 |
|
22 |
| -3. Add code so that the sprite will face to the left, move a few steps, and change costume when the left arrow key is pressed. If you've done it right, it should look like the dog is walking when you press the left arrow key repeatedly. |
| 24 | +_In your window, the dog should look like it is walking when you press the left arrow key repeatedly._ |
23 | 25 |
|
24 |
| -4. Add code so that the dog can walk to the right as well. |
| 26 | +1.4) Enhance your script to look as though the dog can walk to the right with you click the `right arrow` key. |
25 | 27 |
|
26 |
| -## Part 2 - Here be Dragons |
| 28 | +## Part 2: Here be Dragons |
27 | 29 |
|
28 |
| -1. Create a new sprite. Following the same steps as in part 1.1, import the costumes "dragon1-a" and "dragon1-b". |
| 30 | +1.1) Create a new sprite. Following the same steps as in part 1.1, import the costumes `dragon1-a` and `dragon1-b`. |
29 | 31 |
|
30 |
| -2. Write a script to make the sprite appear to breathe fire when the 'f' key is pressed. The sprite should switch to the "fire-breathing" costume for a few seconds, then switch back to the "normal" costume. |
| 32 | +1.2) Write a script to make the sprite appear to breathe fire when the `f` key is pressed. The sprite should switch to the `fire-breathing` costume for a few seconds, then switch back to the original costume. |
31 | 33 |
|
32 |
| -3. Modify your code so that the dragon "attacks" the mouse pointer when the 'f' key is pressed. When the 'f' key is pressed, the dragon should take the following actions in order: |
| 34 | +1.3) Modify your script so that the dragon `attacks` the mouse pointer when the `f` key is pressed. When the `f` key is pressed, the dragon should take the following actions in order: |
33 | 35 |
|
34 |
| - * Make sure it is in the "normal" costume |
35 |
| - * Point at the mouse pointer |
36 |
| - * Glide to the mouse pointer's position |
37 |
| - * Change to the "fire-breathing" costume |
38 |
| - * Pause to breathe fire |
39 |
| - * Change back to the "normal" costume |
| 36 | +1. Make sure it is in the "normal" costume |
| 37 | +2. Point at the mouse pointer |
| 38 | +3. Glide to the mouse pointer's position |
| 39 | +4. Change to the "fire-breathing" costume |
| 40 | +5. Pause to breathe fire |
| 41 | +6. Change back to the "normal" costume |
40 | 42 |
|
41 |
| -## Part 3 - Run Away |
| 43 | +## Part 3: Run Away |
42 | 44 |
|
43 | 45 | 3.1) Add another sprite to your program. (This sprite can have any costume you choose).
|
44 | 46 |
|
45 |
| -3.2) Write a script to make this new sprite point away from the dragon and move when the 'r' key is pressed. (You'll need more than one block to do this.). |
| 47 | +3.2) Write a script to make this new sprite point away from the dragon and move when the `r` key is pressed. |
46 | 48 |
|
47 |
| -3.3) Modify your code so that instead of moving when the 'r' key is pressed, the new sprite moves when the dragon "attacks." The "fleeing" sprite should move when the dragon starts breathing fire. |
| 49 | +3.3) Modify your script so that instead of moving when the `r` key is pressed, the new sprite moves when the dragon `attacks.` The `fleeing` sprite should move when the dragon starts breathing fire. |
48 | 50 |
|
49 | 51 | 3.4) Add a second sprite that runs away from the dragon as well.
|
50 | 52 |
|
51 | 53 | ## Grading Scheme/Rubric
|
52 | 54 |
|
53 |
| -| **Lab 1.4 Criteria** | Points | |
54 |
| -| ------------------------------------------------- | -------------- | |
55 |
| -| 2.2 Dragon breathes fire | 0.25 points | |
56 |
| -| 2.3 Dragon attacks mouse pointer correctly | 0.75 points | |
57 |
| -| 3.2 A sprite runs away from dragon | 0.25 points | |
58 |
| -| 3.3 Sprite runs away when dragon breathes fire | 0.5 points | |
59 |
| -| 3.4 Another sprite runs away too | 0.25 points | |
60 |
| -| **PROJECT TOTAL** | **2.0 points** | |
| 55 | +| **Lab 1.4 Criteria** | Points | |
| 56 | +| :------------------ | :--- | |
| 57 | +| 2.2 Dragon breathes fire | 0.25 | |
| 58 | +| 2.3 Dragon attacks mouse pointer correctly | 0.75 | |
| 59 | +| 3.2 A sprite runs away from dragon | 0.25 | |
| 60 | +| 3.3 Sprite runs away when dragon breathes fire | 0.5 | |
| 61 | +| 3.4 Another sprite runs away too | 0.25 | |
| 62 | +| **PROJECT TOTAL** | **2.0 points** | |
61 | 63 |
|
62 | 64 | <!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="https://casual-effects.com/markdeep/latest/markdeep.min.js"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>
|
0 commit comments