pxt-arcade 1.7.3 → 1.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/built/common-sim.d.ts +2 -0
- package/built/common-sim.js +4 -0
- package/built/target.js +1788 -236
- package/built/target.json +1788 -236
- package/built/targetlight.json +5 -5
- package/built/theme.json +3 -2
- package/docs/gamejam/global-2021.html +459 -0
- package/docs/hour-of-code/all.md +27 -0
- package/docs/hour-of-code/{educators.html → educators-2020.html} +25 -25
- package/docs/hour-of-code/educators-2021.html +625 -0
- package/docs/{hour-of-code.html → hour-of-code-2020.html} +37 -37
- package/docs/hour-of-code-2021.html +438 -183
- package/docs/hour-of-code-ref.json +3 -0
- package/docs/index-ref.json +1 -1
- package/docs/multipart-tutorials.md +0 -8
- package/docs/projects/SUMMARY.md +3 -2
- package/docs/recipes.md +0 -7
- package/docs/skillmap/clicker/clicker1.md +7 -7
- package/docs/skillmap/clicker/clicker2.md +9 -9
- package/docs/skillmap/clicker/clicker3.md +8 -8
- package/docs/skillmap/clicker/clicker4.md +8 -8
- package/docs/skillmap/clicker/clicker4a.md +7 -7
- package/docs/skillmap/clicker/clicker5.md +3 -3
- package/docs/skillmap/clicker-themed/clickert1.md +66 -38
- package/docs/skillmap/clicker-themed/clickert2.md +77 -58
- package/docs/skillmap/clicker-themed/clickert3.md +75 -55
- package/docs/skillmap/clicker-themed/clickert4.md +105 -118
- package/docs/skillmap/collector/collector1.md +11 -11
- package/docs/skillmap/collector/collector1a.md +8 -8
- package/docs/skillmap/collector/collector2.md +8 -8
- package/docs/skillmap/collector/collector3.md +8 -8
- package/docs/skillmap/collector/collector3a.md +7 -7
- package/docs/skillmap/collector/collector4.md +8 -8
- package/docs/skillmap/collector/collector5.md +2 -2
- package/docs/skillmap/collector-themed/collectort1.md +107 -88
- package/docs/skillmap/collector-themed/collectort2.md +109 -87
- package/docs/skillmap/collector-themed/collectort3.md +138 -115
- package/docs/skillmap/collector-themed/collectort4.md +130 -118
- package/docs/skillmap/collector-themed/collectort4old.md +23 -23
- package/docs/skillmap/collector-themed/collectort5.md +2 -2
- package/docs/skillmap/educator-info/forest-map-info.md +34 -25
- package/docs/skillmap/educator-info/pongo-map-info.md +55 -0
- package/docs/skillmap/educator-info/racer-map-info.md +105 -0
- package/docs/skillmap/educator-info/rockstar-map-info.md +1 -1
- package/docs/skillmap/educator-info/simple-shark-map-info.md +101 -0
- package/docs/skillmap/forest/forest1.md +1 -69
- package/docs/skillmap/forest/forest2.md +5 -65
- package/docs/skillmap/forest/forest3.md +1 -174
- package/docs/skillmap/forest/forest4.md +2 -336
- package/docs/skillmap/forest/forest5.md +1 -396
- package/docs/skillmap/forest/forest6.md +6 -372
- package/docs/skillmap/forest-old.md +92 -0
- package/docs/skillmap/forest.md +9 -9
- package/docs/skillmap/forest_new/forest1.md +191 -0
- package/docs/skillmap/forest_new/forest2.md +217 -0
- package/docs/skillmap/forest_new/forest3.md +333 -0
- package/docs/skillmap/forest_new/forest4.md +196 -0
- package/docs/skillmap/forest_new/forest5.md +291 -0
- package/docs/skillmap/forest_new/forest6.md +272 -0
- package/docs/skillmap/interface/activity1.md +41 -49
- package/docs/skillmap/jungle/jungle1.md +48 -28
- package/docs/skillmap/jungle/jungle2.md +50 -26
- package/docs/skillmap/jungle/jungle3.md +48 -27
- package/docs/skillmap/jungle/jungle4.md +76 -58
- package/docs/skillmap/jungle/jungle5.md +31 -25
- package/docs/skillmap/jungle/jungle6.md +34 -28
- package/docs/skillmap/jungle/jungle7.md +36 -24
- package/docs/skillmap/jungle/jungle8.md +27 -25
- package/docs/skillmap/jungle.md +7 -3
- package/docs/skillmap/long-shark.md +119 -0
- package/docs/skillmap/pongo/pongo1.md +256 -0
- package/docs/skillmap/pongo/pongo2.md +179 -0
- package/docs/skillmap/pongo/pongo3.md +177 -0
- package/docs/skillmap/pongo.md +59 -0
- package/docs/skillmap/racer.md +7 -7
- package/docs/skillmap/rockstar/rockstar1.md +32 -41
- package/docs/skillmap/rockstar/rockstar2.md +45 -27
- package/docs/skillmap/rockstar/rockstar3.md +45 -27
- package/docs/skillmap/rockstar.md +3 -1
- package/docs/skillmap/shark/shark1-simple.md +151 -0
- package/docs/skillmap/shark/shark2-simple.md +203 -0
- package/docs/skillmap/shark/shark3-simple.md +204 -0
- package/docs/skillmap/shark/shark4-simple.md +246 -0
- package/docs/skillmap/shark/shark4a-simple.md +244 -0
- package/docs/skillmap/shark.md +25 -58
- package/docs/skillmap/space/space1.md +63 -29
- package/docs/skillmap/space/space2.md +34 -25
- package/docs/skillmap/space/space3.md +86 -69
- package/docs/skillmap/space/space4.md +96 -65
- package/docs/skillmap/space/space4a.md +34 -25
- package/docs/skillmap/space/space5.md +81 -45
- package/docs/skillmap/space/space6.md +59 -81
- package/docs/skillmap/space.md +8 -5
- package/docs/skillmap/story/card.md +6 -6
- package/docs/skillmap/story/card2.md +6 -6
- package/docs/skillmap/story/story1.md +60 -175
- package/docs/skillmap/story/story2.md +89 -327
- package/docs/skillmap/story/story3.md +238 -228
- package/docs/skillmap/story/story4.md +23 -23
- package/docs/skillmap/zoo/zoo1.md +31 -16
- package/docs/skillmap/zoo/zoo2.md +45 -30
- package/docs/skillmap/zoo/zoo2a.md +51 -36
- package/docs/skillmap/zoo/zoo3.md +8 -7
- package/docs/skillmap/zoo/zoo4.md +61 -32
- package/docs/skillmap/zoo/zoo5.md +41 -31
- package/docs/skillmap/zoo.md +2 -2
- package/docs/skillmaps.md +20 -4
- package/docs/static/experiments/accessibleblocks.png +0 -0
- package/docs/static/experiments/blockserrorlist.png +0 -0
- package/docs/static/gamejam/jams/global-2021/assets/banner.png +0 -0
- package/docs/static/gamejam/jams/global-2021/info.json +10 -0
- package/docs/static/gamejam/jams/global-2021/rules.md +22 -0
- package/docs/static/gamejam/jams/global-2021/style.css +141 -0
- package/docs/static/gamejam/lib/gamejam.d.ts +1 -0
- package/docs/static/gamejam/lib/gamejam.js +34 -24
- package/docs/static/gamejam/lib/gamejam.ts +35 -24
- package/docs/static/hero-gallery/stream.png +0 -0
- package/docs/static/hour-of-code/{apple.png → 2020/apple.png} +0 -0
- package/docs/static/hour-of-code/{arcade.png → 2020/arcade.png} +0 -0
- package/docs/static/hour-of-code/{asphodel.png → 2020/asphodel.png} +0 -0
- package/docs/static/hour-of-code/{card.png → 2020/card.png} +0 -0
- package/docs/static/hour-of-code/{chase-the-pizza.png → 2020/chase-the-pizza.png} +0 -0
- package/docs/static/hour-of-code/{clovers.png → 2020/clovers.png} +0 -0
- package/docs/static/hour-of-code/{design.png → 2020/design.png} +0 -0
- package/docs/static/hour-of-code/{educators → 2020/educators}/asphodel-level1.png +0 -0
- package/docs/static/hour-of-code/{educators → 2020/educators}/asphodel-level4.png +0 -0
- package/docs/static/hour-of-code/{educators → 2020/educators}/asphodel-level6.png +0 -0
- package/docs/static/hour-of-code/{educators → 2020/educators}/asphodel-level7.png +0 -0
- package/docs/static/hour-of-code/{educators → 2020/educators}/asphodel-level9.png +0 -0
- package/docs/static/hour-of-code/{educators → 2020/educators}/clover-design.gif +0 -0
- package/docs/static/hour-of-code/{educators → 2020/educators}/shark-attack-tutorial.png +0 -0
- package/docs/static/hour-of-code/{galga.png → 2020/galga.png} +0 -0
- package/docs/static/hour-of-code/{lemon-leak.png → 2020/lemon-leak.png} +0 -0
- package/docs/static/hour-of-code/{micro-bit.png → 2020/micro-bit.png} +0 -0
- package/docs/static/hour-of-code/{minecraft.png → 2020/minecraft.png} +0 -0
- package/docs/static/hour-of-code/{nfl.png → 2020/nfl.png} +0 -0
- package/docs/static/hour-of-code/{ocean-jam.png → 2020/ocean-jam.png} +0 -0
- package/docs/static/hour-of-code/{pixel-background-primary.png → 2020/pixel-background-primary.png} +0 -0
- package/docs/static/hour-of-code/{pixel-background-secondary.png → 2020/pixel-background-secondary.png} +0 -0
- package/docs/static/hour-of-code/{shadowed-aside-frame.png → 2020/shadowed-aside-frame.png} +0 -0
- package/docs/static/hour-of-code/{shadowed-button-frame.png → 2020/shadowed-button-frame.png} +0 -0
- package/docs/static/hour-of-code/{shadowed-primary-frame.png → 2020/shadowed-primary-frame.png} +0 -0
- package/docs/static/hour-of-code/{shark-attack.png → 2020/shark-attack.png} +0 -0
- package/docs/static/hour-of-code/{simulator.gif → 2020/simulator.gif} +0 -0
- package/docs/static/hour-of-code/{simulator.png → 2020/simulator.png} +0 -0
- package/docs/static/hour-of-code/{styles.css → 2020/styles.css} +1 -1
- package/docs/static/hour-of-code/2021/Rowdies/OFL.txt +93 -0
- package/docs/static/hour-of-code/2021/Rowdies/Rowdies-Bold.ttf +0 -0
- package/docs/static/hour-of-code/2021/Rowdies/Rowdies-Regular.ttf +0 -0
- package/docs/static/hour-of-code/2021/beginner-skillmap.png +0 -0
- package/docs/static/hour-of-code/2021/favicon.png +0 -0
- package/docs/static/hour-of-code/2021/forest-skillmap-game.gif +0 -0
- package/docs/static/hour-of-code/2021/game-jam-hero.png +0 -0
- package/docs/static/hour-of-code/2021/hoc-2020.png +0 -0
- package/docs/static/hour-of-code/2021/hoc-card.png +0 -0
- package/docs/static/hour-of-code/2021/hoc-header-educators.png +0 -0
- package/docs/static/hour-of-code/2021/hoc-header-plane.gif +0 -0
- package/docs/static/hour-of-code/2021/hoc-header-scene.gif +0 -0
- package/docs/static/hour-of-code/2021/jungle-skillmap.png +0 -0
- package/docs/static/hour-of-code/2021/makecode-example.png +0 -0
- package/docs/static/hour-of-code/2021/microbit.png +0 -0
- package/docs/static/hour-of-code/2021/minecraft.png +0 -0
- package/docs/static/hour-of-code/2021/rockstar-skillmap.png +0 -0
- package/docs/static/hour-of-code/2021/styles.css +660 -62
- package/docs/static/logo.png +0 -0
- package/docs/static/skillmap/assets/my-assets-three.png +0 -0
- package/docs/static/skillmap/assets/sprite-from-container.gif +0 -0
- package/docs/static/skillmap/backgrounds/jungle-bg.png +0 -0
- package/docs/static/skillmap/backgrounds/jungle-map.png +0 -0
- package/docs/static/skillmap/backgrounds/rock-map.png +0 -0
- package/docs/static/skillmap/backgrounds/rockstar-card.gif +0 -0
- package/docs/static/skillmap/backgrounds/space-comp.png +0 -0
- package/docs/static/skillmap/backgrounds/space.png +0 -0
- package/docs/static/skillmap/certificates/forest-cert.pdf +0 -0
- package/docs/static/skillmap/certificates/forest-cert.png +0 -0
- package/docs/static/skillmap/certificates/jungle-cert.pdf +0 -0
- package/docs/static/skillmap/certificates/jungle-cert.png +0 -0
- package/docs/static/skillmap/certificates/rockstar-cert.pdf +0 -0
- package/docs/static/skillmap/certificates/rockstar-cert.png +0 -0
- package/docs/static/skillmap/certificates/shark-cert.pdf +0 -0
- package/docs/static/skillmap/certificates/shark-cert.png +0 -0
- package/docs/static/skillmap/certificates/space-cert.pdf +0 -0
- package/docs/static/skillmap/certificates/space-cert.png +0 -0
- package/docs/static/skillmap/pongo/pongo1.gif +0 -0
- package/docs/static/skillmap/pongo/pongo2gif +0 -0
- package/docs/static/skillmap/pongo/pongo3.gif +0 -0
- package/docs/static/skillmap/racer/racer1.gif +0 -0
- package/docs/static/skillmap/racer/racer2.gif +0 -0
- package/docs/static/skillmap/racer/racer3.gif +0 -0
- package/docs/static/skillmap/rockstar/rockstar1.gif +0 -0
- package/docs/static/skillmap/rockstar/rockstar2.gif +0 -0
- package/docs/static/skillmap/rockstar/rockstar3.gif +0 -0
- package/docs/static/skillmap/shark/shark1-simple.gif +0 -0
- package/docs/static/skillmap/shark/shark4a-simple.gif +0 -0
- package/docs/static/skillmap/zoo/overlaps-food-sprite.gif +0 -0
- package/docs/tutorials/barrel-dodger.md +4 -4
- package/docs/tutorials/collect-the-clovers.md +2 -2
- package/docs/tutorials/froggy.md +105 -90
- package/docs/tutorials/hundred.md +400 -0
- package/package.json +3 -3
- package/pxtarget.json +3 -2
- package/targetconfig.json +4 -1
- package/docs/recipes/wonder-woman-1984/01-maze.md +0 -291
- package/docs/recipes/wonder-woman-1984/02-artifact.md +0 -70
- package/docs/recipes/wonder-woman-1984/03-enemies.md +0 -65
- package/docs/skillmap/forest/forest9.md +0 -714
- package/docs/static/hour-of-code/2021/placeholder.png +0 -0
- package/docs/static/hour-of-code/ww-maze.png +0 -0
- package/docs/static/recipes/wonder-woman-1984/artifact-preview.png +0 -0
- package/docs/static/recipes/wonder-woman-1984/artifacts-location.gif +0 -0
- package/docs/static/recipes/wonder-woman-1984/draw-maze-backup.png +0 -0
- package/docs/static/recipes/wonder-woman-1984/draw-walls-backup.png +0 -0
- package/docs/static/recipes/wonder-woman-1984/end-position.png +0 -0
- package/docs/static/recipes/wonder-woman-1984/enemies-location.gif +0 -0
- package/docs/static/recipes/wonder-woman-1984/enemies-preview.png +0 -0
- package/docs/static/recipes/wonder-woman-1984/fill-maze.gif +0 -0
- package/docs/static/recipes/wonder-woman-1984/fill-walls.gif +0 -0
- package/docs/static/recipes/wonder-woman-1984/wonder-woman3.png +0 -0
- package/docs/static/recipes/wonder-woman-1984/ww-splash3.gif +0 -0
- package/docs/static/recipes/wonder-woman-1984/ww-splash3.mp4 +0 -0
- package/docs/static/ww84-background.png +0 -0
- package/docs/static/ww84-header.png +0 -0
- package/docs/ww84.html +0 -276
- package/sim/public/locales/zh-CN/bundled-strings.json +0 -1800
- package/sim/public/locales/zh-CN/target-strings.json +0 -13
- package/sim/public/locales/zh-TW/bundled-strings.json +0 -1903
- package/sim/public/locales/zh-TW/target-strings.json +0 -8
|
@@ -3,34 +3,38 @@
|
|
|
3
3
|
|
|
4
4
|
## Welcome @showdialog
|
|
5
5
|
|
|
6
|
-
**One of our baubles is locked away!**
|
|
6
|
+
**One of our baubles is locked away!**
|
|
7
|
+
|
|
7
8
|
This activity will show you how to explode tiles so you can get every point.
|
|
8
9
|
|
|
9
10
|

|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
|
|
13
|
-
##
|
|
14
|
+
## 2. Try It!
|
|
14
15
|
|
|
15
|
-
**🕹️ Start by playing the game in the game window
|
|
16
|
+
**🕹️ Start by playing the game in the game window**
|
|
16
17
|
|
|
17
18
|
---
|
|
18
19
|
|
|
19
20
|
Can you find the bauble that's blocked-in?
|
|
20
21
|
|
|
21
22
|
|
|
22
|
-
##
|
|
23
|
+
## 3. When B Pressed
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
**Nothing a little dynamite can't fix**
|
|
26
|
+
💥💥💥
|
|
27
|
+
We need to remove some walls and tiles! Let's clear the way when the (B) button is pressed.
|
|
26
28
|
|
|
27
29
|
---
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
- :game: Drag the
|
|
32
|
+
``||controller:on [A] button [pressed]||``
|
|
33
|
+
container into an empty area of the workspace.
|
|
30
34
|
|
|
31
|
-
|
|
35
|
+
- :mouse pointer: Click the letter A and change it to B.
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
_ 💡 Move to the next step to learn how to spawn your explosive._
|
|
34
38
|
|
|
35
39
|
|
|
36
40
|
```blocks
|
|
@@ -39,17 +43,21 @@ controller.B.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
|
39
43
|
})
|
|
40
44
|
```
|
|
41
45
|
|
|
42
|
-
##
|
|
46
|
+
## 4. Set the Explosive
|
|
43
47
|
|
|
44
48
|
We're going to use a **Projectile** block here, even though our dynamite stays in one place.
|
|
45
49
|
|
|
46
50
|
---
|
|
47
51
|
|
|
48
|
-
|
|
52
|
+
- :paper plane: Drag
|
|
53
|
+
``||variables:set [projectile] to projectile from [mySprite] with vx [50] vy [50]||``
|
|
54
|
+
into the empty
|
|
55
|
+
``||controller:on [B] button [pressed]||``
|
|
56
|
+
container.
|
|
49
57
|
|
|
50
|
-
|
|
58
|
+
- :mouse pointer: Change both **vx** (horizontal speed) and **vy** (vertical speed) to **0** so the explosive stays where you drop it.
|
|
51
59
|
|
|
52
|
-
💡 Don't set the image yet. We'll handle that in another step.
|
|
60
|
+
_💡 Don't set the image yet. We'll handle that in another step._
|
|
53
61
|
|
|
54
62
|
|
|
55
63
|
|
|
@@ -61,17 +69,24 @@ controller.B.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
|
61
69
|
})
|
|
62
70
|
```
|
|
63
71
|
|
|
64
|
-
##
|
|
72
|
+
## 5. Make it Powerful
|
|
65
73
|
|
|
66
74
|
For the explosive to overlap the blocks around it, we need it to be able to **go through walls**!
|
|
67
75
|
|
|
68
76
|
---
|
|
69
77
|
|
|
70
|
-
|
|
78
|
+
- :paper plane: Drag
|
|
79
|
+
``||sprites:set [mySprite] [auto destroy] <OFF>||``
|
|
80
|
+
into **the end** of
|
|
81
|
+
``||controller:on [B] button [pressed]||``
|
|
82
|
+
container, then toggle **`<OFF>`** to **`<ON>`**.
|
|
71
83
|
|
|
72
|
-
|
|
84
|
+
- :mouse pointer: Click ``||variables:mySprite||`` and change it to ``||variables:projectile||``.
|
|
73
85
|
|
|
74
|
-
|
|
86
|
+
- :mouse pointer: Click
|
|
87
|
+
``||sprites:auto destroy||``
|
|
88
|
+
and change it to
|
|
89
|
+
``||sprites:ghost through walls||``.
|
|
75
90
|
|
|
76
91
|
|
|
77
92
|
```blocks
|
|
@@ -83,17 +98,20 @@ let projectile = sprites.createProjectileFromSprite(assets.image`blank`, mySprit
|
|
|
83
98
|
})
|
|
84
99
|
```
|
|
85
100
|
|
|
86
|
-
##
|
|
101
|
+
## 6. Animate It!
|
|
87
102
|
|
|
88
103
|
In this step, we'll choose **an animation** for our projectile to make it look like it's exploding!
|
|
89
104
|
|
|
90
105
|
---
|
|
91
106
|
|
|
92
|
-
|
|
107
|
+
- :chevron down: Click the **Advanced** category in the toolbar to reveal the ``||animation:Animation||`` category.
|
|
93
108
|
|
|
94
|
-
|
|
109
|
+
- :sync: Drag the large
|
|
110
|
+
``||animation:animate [mySprite]||``
|
|
111
|
+
block to **the end** of
|
|
112
|
+
``||controller:on [B] button [pressed]||``.
|
|
95
113
|
|
|
96
|
-
|
|
114
|
+
- :mouse pointer: Click ``||variables:mySprite||`` and change it to ``||variables:projectile||``.
|
|
97
115
|
|
|
98
116
|
|
|
99
117
|
```blocks
|
|
@@ -104,22 +122,7 @@ controller.B.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
|
104
122
|
animation.runImageAnimation(
|
|
105
123
|
projectile,
|
|
106
124
|
[img`
|
|
107
|
-
.
|
|
108
|
-
. . . . . . . . . . . . . . . .
|
|
109
|
-
. . . . . . . . . . . . . . . .
|
|
110
|
-
. . . . . . . . . . . . . . . .
|
|
111
|
-
. . . . . . . . . . . . . . . .
|
|
112
|
-
. . . . . . . . . . . . . . . .
|
|
113
|
-
. . . . . . . . . . . . . . . .
|
|
114
|
-
. . . . . . . . . . . . . . . .
|
|
115
|
-
. . . . . . . . . . . . . . . .
|
|
116
|
-
. . . . . . . . . . . . . . . .
|
|
117
|
-
. . . . . . . . . . . . . . . .
|
|
118
|
-
. . . . . . . . . . . . . . . .
|
|
119
|
-
. . . . . . . . . . . . . . . .
|
|
120
|
-
. . . . . . . . . . . . . . . .
|
|
121
|
-
. . . . . . . . . . . . . . . .
|
|
122
|
-
. . . . . . . . . . . . . . . .
|
|
125
|
+
.
|
|
123
126
|
`],
|
|
124
127
|
500,
|
|
125
128
|
false
|
|
@@ -127,14 +130,14 @@ controller.B.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
|
127
130
|
})
|
|
128
131
|
```
|
|
129
132
|
|
|
130
|
-
##
|
|
133
|
+
## 7. Choose the Boom!
|
|
131
134
|
|
|
132
135
|
|
|
133
|
-
|
|
136
|
+
- :paint brush: Inside the large ``||animation:animate [mySprite]||`` block, click the empty grey square and toggle to **My Assets** to choose the **splode** animation, then click **Done**.
|
|
134
137
|
|
|
135
|
-
|
|
138
|
+
- :binoculars: The **interval** should automatically change to **100** ms, but if it doesn't, you can change it yourself.
|
|
136
139
|
|
|
137
|
-
💡 Don't worry if the animation looks empty in your code. The beginning frames are blank to give your character time to get out of the way!
|
|
140
|
+
_💡 Don't worry if the animation looks empty in your code. The beginning frames are blank to give your character time to get out of the way!_
|
|
138
141
|
|
|
139
142
|
|
|
140
143
|
```blocks
|
|
@@ -151,30 +154,32 @@ controller.B.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
|
151
154
|
})
|
|
152
155
|
```
|
|
153
156
|
|
|
154
|
-
## Try It!
|
|
157
|
+
## 8. Try It Again!
|
|
155
158
|
|
|
156
|
-
**🕹️ Now try your game
|
|
159
|
+
**🕹️ Now try your game**
|
|
157
160
|
|
|
158
161
|
---
|
|
159
162
|
|
|
160
|
-
You should be able to jump with the up arrow, place tiles with the A button, and set an explosive with the B button.
|
|
163
|
+
You should be able to jump with the up arrow, place tiles with the (A) button, and set an explosive with the (B) button.
|
|
161
164
|
|
|
162
165
|
**BUT WAIT!** The explosive doesn't do anything. We'll fix that in the next step.
|
|
163
166
|
|
|
164
167
|
|
|
165
168
|
|
|
166
|
-
##
|
|
169
|
+
## 9. Removing Block Tiles
|
|
167
170
|
|
|
168
|
-
**💥 Kaboom 💥**
|
|
171
|
+
**💥 Kaboom 💥**
|
|
169
172
|
When your **splode** animation overlaps a platform tile, we need to remove both the wall and the tile.
|
|
170
173
|
|
|
171
174
|
---
|
|
172
175
|
|
|
173
|
-
|
|
176
|
+
- :tree: Drag the
|
|
177
|
+
``||scene:on [sprite] of kind [Player] overlaps [ ] at [location]||``
|
|
178
|
+
container into an empty area of the workspace.
|
|
174
179
|
|
|
175
|
-
|
|
180
|
+
- :mouse pointer: Click ``||sprites:Player||`` and change it to ``||sprites:Projectile||``.
|
|
176
181
|
|
|
177
|
-
|
|
182
|
+
- :paint brush: Click the empty tile box and choose the leafy **skyblock** platform tile.
|
|
178
183
|
|
|
179
184
|
|
|
180
185
|
```blocks
|
|
@@ -183,11 +188,18 @@ scene.onOverlapTile(SpriteKind.Projectile, assets.tile`skyblock`, function (spri
|
|
|
183
188
|
})
|
|
184
189
|
```
|
|
185
190
|
|
|
186
|
-
##
|
|
191
|
+
## 10. Removing Walls
|
|
187
192
|
|
|
188
|
-
|
|
193
|
+
- :tree: Drag
|
|
194
|
+
``||scene:set wall <OFF> at tilemap col [0] row [0]||``
|
|
195
|
+
into the empty
|
|
196
|
+
``||scene:on [sprite] of kind [Projectile] overlaps [skyblock] at [location]||``
|
|
197
|
+
container.
|
|
189
198
|
|
|
190
|
-
|
|
199
|
+
- :mouse pointer: To remove the wall at the location of overlap, drag the ``||variables:location||`` value block out of the
|
|
200
|
+
``||scene:on [sprite] of kind [Projectile] overlaps [skyblock] at [location]||``
|
|
201
|
+
title and drop it in to replace
|
|
202
|
+
``||scene:tilemap col [0] row [0]||``.
|
|
191
203
|
|
|
192
204
|

|
|
193
205
|
|
|
@@ -204,15 +216,21 @@ scene.onOverlapTile(SpriteKind.Projectile, assets.tile`skyblock`, function (spri
|
|
|
204
216
|

|
|
205
217
|
|
|
206
218
|
|
|
207
|
-
##
|
|
219
|
+
## 11. Removing Tiles
|
|
208
220
|
|
|
209
221
|
Lastly, we need to remove the tile from the same place that we removed the wall.
|
|
210
222
|
|
|
211
223
|
---
|
|
212
224
|
|
|
213
|
-
|
|
225
|
+
- :tree: Drag
|
|
226
|
+
``||scene:set [ ] at tilemap col [0] row [0]||``
|
|
227
|
+
into **the end** of the
|
|
228
|
+
``||scene:on [sprite] of kind [Projectile] overlaps [skyblock] at [location]||``
|
|
229
|
+
container.
|
|
214
230
|
|
|
215
|
-
|
|
231
|
+
- :mouse pointer: To remove the tile at the location of overlap, drag the ``||variables:location||`` value block out of the
|
|
232
|
+
``||scene:on [sprite] of kind [Projectile] overlaps [skyblock] at [location]||`` title and drop it in to replace
|
|
233
|
+
``||scene:tilemap col [0] row [0]||``.
|
|
216
234
|
|
|
217
235
|
|
|
218
236
|
```blocks
|
|
@@ -223,7 +241,7 @@ scene.onOverlapTile(SpriteKind.Projectile, assets.tile`skyblock`, function (spri
|
|
|
223
241
|
})
|
|
224
242
|
```
|
|
225
243
|
|
|
226
|
-
##
|
|
244
|
+
## 12. Play!
|
|
227
245
|
|
|
228
246
|
**🕹️ Time to play your game 🕹️**
|
|
229
247
|
|
|
@@ -233,13 +251,13 @@ You should have everything you need to collect all five baubles and get to the e
|
|
|
233
251
|
|
|
234
252
|
|
|
235
253
|
|
|
236
|
-
##
|
|
254
|
+
## Finale
|
|
237
255
|
|
|
238
256
|
**Play your game and see how many points you can get.**
|
|
239
257
|
|
|
240
258
|
---
|
|
241
259
|
|
|
242
|
-
When you're done playing, click **Done** to return to the main page to
|
|
260
|
+
When you're done playing, click **Done** to return to the main page to find out how to add additional consequences for your explosives!
|
|
243
261
|
|
|
244
262
|
|
|
245
263
|
|
|
@@ -3,33 +3,35 @@
|
|
|
3
3
|
|
|
4
4
|
## Welcome @showdialog
|
|
5
5
|
|
|
6
|
-
**🧨 Explosions are dangerous 🧨**
|
|
6
|
+
**🧨 Explosions are dangerous 🧨**
|
|
7
|
+
|
|
7
8
|
This activity will show you how to register a hit on your player if the monkey is standing too close to the blast. You can remove other game elements, too!
|
|
8
9
|
|
|
9
10
|

|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
|
|
13
|
-
##
|
|
14
|
+
## 2. Try It!
|
|
14
15
|
|
|
15
|
-
**🕹️ Start by playing your game in the game window
|
|
16
|
+
**🕹️ Start by playing your game in the game window**
|
|
16
17
|
|
|
17
18
|
---
|
|
18
19
|
|
|
19
20
|
Can you connect each chunk of code to the actions it creates?
|
|
20
21
|
|
|
21
22
|
|
|
22
|
-
##
|
|
23
|
+
## 3. Fried Monkey?
|
|
23
24
|
|
|
24
|
-
**💥 STAND BACK 💥**
|
|
25
|
+
**💥 STAND BACK 💥**
|
|
25
26
|
Make sure to get the monkey out of the way before the big bang!
|
|
26
27
|
|
|
27
28
|
---
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
``||sprites:on [sprite] of kind [Player] overlaps [otherSprite] of kind [Player]||``
|
|
30
|
+
- :paper plane: Drag the
|
|
31
|
+
``||sprites:on [sprite] of kind [Player] overlaps [otherSprite] of kind [Player]||``
|
|
32
|
+
container into an empty area of the workspace.
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
- :mouse pointer: Click the second kind ``||sprites:Player||`` and change it to ``||sprites:Projectile||``.
|
|
33
35
|
|
|
34
36
|
|
|
35
37
|
```blocks
|
|
@@ -38,11 +40,13 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Projectile, function (sprite, ot
|
|
|
38
40
|
})
|
|
39
41
|
```
|
|
40
42
|
|
|
41
|
-
##
|
|
43
|
+
## 4. Remove the Projectile
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
- :paper plane: Drag
|
|
46
|
+
``||sprites:destroy [mySprite]||``
|
|
47
|
+
into the empty **on Projectile overlaps Player** container.
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
- :mouse pointer: Drag the ``||variables:otherSprite||`` value block out of the title bar to replace ``||variables:mySprite||``.
|
|
46
50
|
|
|
47
51
|

|
|
48
52
|
|
|
@@ -62,13 +66,15 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Projectile, function (sprite, ot
|
|
|
62
66
|
|
|
63
67
|
|
|
64
68
|
|
|
65
|
-
##
|
|
69
|
+
## 5. Take a Hit
|
|
66
70
|
|
|
67
71
|
Don't forget to remove HP from the monkey!
|
|
68
72
|
|
|
69
73
|
---
|
|
70
74
|
|
|
71
|
-
|
|
75
|
+
- :id card: Drag
|
|
76
|
+
``||info:change life by [-1]||``
|
|
77
|
+
to **the end** of the **on Projectile overlaps Player** container.
|
|
72
78
|
|
|
73
79
|
|
|
74
80
|
```blocks
|
|
@@ -81,31 +87,31 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Projectile, function (sprite, ot
|
|
|
81
87
|
|
|
82
88
|
|
|
83
89
|
|
|
84
|
-
## Try It!
|
|
90
|
+
## 6. Try It!
|
|
85
91
|
|
|
86
92
|
**🕹️ Try your game 🕹️**
|
|
87
93
|
|
|
88
94
|
---
|
|
89
95
|
|
|
90
|
-
You should be able to jump with the up arrow, place tiles with the A button, and set an explosive with the B button.
|
|
96
|
+
You should be able to jump with the up arrow, place tiles with the (A) button, and set an explosive with the (B) button.
|
|
91
97
|
|
|
92
98
|
**What happens if you don't get your monkey out of the way quickly enough?**
|
|
93
99
|
|
|
94
100
|
|
|
95
101
|
|
|
96
102
|
|
|
97
|
-
##
|
|
103
|
+
## 7. Remove More Tiles
|
|
98
104
|
|
|
99
|
-
**💥 Kablow 💥**
|
|
105
|
+
**💥 Kablow 💥**
|
|
100
106
|
This game could have even more options if we remove **bounce** crates and **poison pit** tiles with explosives, too.
|
|
101
107
|
|
|
102
108
|
---
|
|
103
109
|
|
|
104
|
-
|
|
110
|
+
- :binoculars: Find the **Projectile overlaps skyblock** container that's already in your code.
|
|
105
111
|
|
|
106
|
-
|
|
112
|
+
- :mouse pointer: Right-click the outer container and choose **Duplicate**. The new chunk of code will be faded out, but that's okay!
|
|
107
113
|
|
|
108
|
-
|
|
114
|
+
- :paint brush: In the new container, change the **skyblock** tile to the **bounce** crate.
|
|
109
115
|
|
|
110
116
|
|
|
111
117
|
```blocks
|
|
@@ -119,9 +125,9 @@ scene.onOverlapTile(SpriteKind.Projectile, assets.tile`bounce`, function (sprite
|
|
|
119
125
|
})
|
|
120
126
|
```
|
|
121
127
|
|
|
122
|
-
##
|
|
128
|
+
## 8. Remove More Tiles
|
|
123
129
|
|
|
124
|
-
Repeat the process once again, but this time choose the **poison pit** tile.
|
|
130
|
+
- :mouse pointer: Repeat the process once again, but this time choose the **poison pit** tile.
|
|
125
131
|
|
|
126
132
|
|
|
127
133
|
```blocks
|
|
@@ -140,7 +146,7 @@ scene.onOverlapTile(SpriteKind.Projectile, assets.tile`bounce`, function (sprite
|
|
|
140
146
|
```
|
|
141
147
|
|
|
142
148
|
|
|
143
|
-
##
|
|
149
|
+
## 9. Play!
|
|
144
150
|
|
|
145
151
|
**🕹️ Play your game 🕹️**
|
|
146
152
|
|
|
@@ -150,9 +156,9 @@ Now that you can add and destroy blocks, is there anywhere you can't reach?!
|
|
|
150
156
|
|
|
151
157
|
|
|
152
158
|
|
|
153
|
-
##
|
|
159
|
+
## Finale
|
|
154
160
|
|
|
155
|
-
When you're done playing your game, click **Done** to return to the main
|
|
161
|
+
When you're done playing your game, click **Done** to return to the main skillmap to move on and see how to animate your sprite!
|
|
156
162
|
|
|
157
163
|
|
|
158
164
|
|
|
@@ -11,25 +11,27 @@ Now that we've added an animation for our explosives, let's animate our characte
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## 2. Try It!
|
|
15
15
|
|
|
16
|
-
**🕹️ Start by playing your game in the game window
|
|
16
|
+
**🕹️ Start by playing your game in the game window**
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
20
|
Can you connect each chunk of code to the actions it creates?
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## 3. Step to the Right
|
|
24
24
|
|
|
25
|
-
**➡️ Walking to the Right
|
|
25
|
+
**➡️ Walking to the Right**
|
|
26
26
|
Let's make our character walk to the right when the right arrow is pressed.
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
- :game: To add code that runs when the player moves to the right, drag
|
|
31
|
+
``||controller:on [A] button [pressed]||``
|
|
32
|
+
into an empty area of the workspace.
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
- :mouse pointer: Click ``||controller:A||`` and choose ``||controller:right||`` from the dropdown.
|
|
33
35
|
|
|
34
36
|
|
|
35
37
|
```blocks
|
|
@@ -38,15 +40,19 @@ controller.right.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
|
38
40
|
})
|
|
39
41
|
```
|
|
40
42
|
|
|
41
|
-
##
|
|
43
|
+
## 4. Right Animation
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
- :chevron down: Click the **Advanced** category in the toolbar to reveal the ``||animation:Animation||`` category.
|
|
44
46
|
|
|
45
|
-
|
|
47
|
+
- :sync: Drag the large
|
|
48
|
+
``||animation:animate [mySprite]||``
|
|
49
|
+
block into the empty
|
|
50
|
+
``||controller:on [right] button [pressed]||``
|
|
51
|
+
container.
|
|
46
52
|
|
|
47
|
-
|
|
53
|
+
- :paint brush: Click the empty grey box and toggle to **My Assets** to choose the **walk right** animation.
|
|
48
54
|
|
|
49
|
-
|
|
55
|
+
- :mouse pointer: Toggle **loop** to **`<ON>`** so the monkey continues to walk.
|
|
50
56
|
|
|
51
57
|
|
|
52
58
|
|
|
@@ -64,19 +70,13 @@ controller.right.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
|
64
70
|
|
|
65
71
|
|
|
66
72
|
|
|
67
|
-
##
|
|
73
|
+
## 5. Walk Left
|
|
68
74
|
|
|
69
|
-
**⬅️ And Left
|
|
75
|
+
**⬅️ And Left**
|
|
70
76
|
|
|
71
77
|
---
|
|
72
78
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
► Click ``||controller:A||`` and choose ``||controller:left||`` from the dropdown.
|
|
76
|
-
|
|
77
|
-
► Drag ``||animation:animate [mySprite]||`` into the empty ``||controller:on [left] button [pressed]||`` container.
|
|
78
|
-
|
|
79
|
-
► Click the grey box and toggle to **My Assets** to choose the **walk left** animation, then toggle **loop** to **`<ON>`**.
|
|
79
|
+
Look at what you did for the right animation and see if you can figure out what changes to make when for when the left arrow is pressed.
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
```blocks
|
|
@@ -92,7 +92,7 @@ controller.left.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
|
92
92
|
|
|
93
93
|
|
|
94
94
|
|
|
95
|
-
## Try It!
|
|
95
|
+
## 6. Try It!
|
|
96
96
|
|
|
97
97
|
**🕹️ Try your game 🕹️**
|
|
98
98
|
|
|
@@ -101,17 +101,23 @@ controller.left.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
|
101
101
|
Does your monkey walk right when you click the right arrow? Does it walk left with the left arrow?
|
|
102
102
|
|
|
103
103
|
|
|
104
|
-
##
|
|
104
|
+
## 7. Jump!
|
|
105
105
|
|
|
106
106
|
Now we need an animation that runs when the monkey jumps!
|
|
107
107
|
|
|
108
108
|
---
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
- :binoculars: Find your
|
|
111
|
+
``||controller:on [up] button [pressed]||``
|
|
112
|
+
container that's already in the workspace.
|
|
111
113
|
|
|
112
|
-
|
|
114
|
+
- :sync: Grab an
|
|
115
|
+
``||animation:animate [mySprite]||``
|
|
116
|
+
block and drag it into **the end** of the
|
|
117
|
+
``||controller:on [up] button [pressed]||``
|
|
118
|
+
container.
|
|
113
119
|
|
|
114
|
-
|
|
120
|
+
- :paint brush: Click the empty grey box and toggle to **My Assets** to choose the **jump** animation.
|
|
115
121
|
|
|
116
122
|
|
|
117
123
|
|
|
@@ -129,7 +135,7 @@ controller.up.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
|
129
135
|
```
|
|
130
136
|
|
|
131
137
|
|
|
132
|
-
##
|
|
138
|
+
## 8. Play!
|
|
133
139
|
|
|
134
140
|
**🕹️ Play your game 🕹️**
|
|
135
141
|
|
|
@@ -139,9 +145,9 @@ Your monkey should look amazing as it runs and jumps!
|
|
|
139
145
|
|
|
140
146
|
|
|
141
147
|
|
|
142
|
-
##
|
|
148
|
+
## Finale
|
|
143
149
|
|
|
144
|
-
When you're done playing your game, click **Done** to return to the main
|
|
150
|
+
When you're done playing your game, click **Done** to return to the main skillmap to move on and find out how to add more levels!
|
|
145
151
|
|
|
146
152
|
|
|
147
153
|
|