pxt-arcade 1.11.21 → 1.11.23
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 +5 -0
- package/built/common-sim.js +28 -4
- package/built/sim.js +35 -6
- package/built/target.js +628 -315
- package/built/target.json +628 -315
- package/built/targetlight.json +5 -5
- package/docs/hero-banner.md +7 -2
- package/docs/static/banners/wakanda-banner.png +0 -0
- package/docs/static/skillmap/assets/gallery.png +0 -0
- package/docs/static/skillmap/backgrounds/dino-comp.png +0 -0
- package/docs/static/skillmap/backgrounds/story-comp.png +0 -0
- package/docs/static/tutorials/wakanda/assets.png +0 -0
- package/docs/static/tutorials/wakanda/namor.png +0 -0
- package/docs/static/tutorials/wakanda/okoye.png +0 -0
- package/docs/static/tutorials/wakanda/riri.png +0 -0
- package/docs/static/tutorials/wakanda/shuri.png +0 -0
- package/docs/static/tutorials/wakanda/wakanda.png +0 -0
- package/docs/test/skillmap/balloon/balloon4.md +90 -216
- package/docs/test/skillmap/dino/collectort1.md +334 -0
- package/docs/test/skillmap/dino/collectort2.md +272 -0
- package/docs/test/skillmap/dino/collectort3.md +304 -0
- package/docs/test/skillmap/dino/collectort4.md +330 -0
- package/docs/test/skillmap/dino/collectort4old.md +433 -0
- package/docs/test/skillmap/dino/collectort5.md +499 -0
- package/docs/test/skillmap/dino/scroller.ts +54 -0
- package/docs/test/skillmap/mole/mole1.md +3 -3
- package/docs/test/skillmap/mole/mole2.md +8 -8
- package/docs/test/skillmap/mole/mole3.md +14 -12
- package/docs/test/skillmap/mole/mole4.md +14 -12
- package/docs/test/skillmap/star/star1.md +270 -0
- package/docs/test/skillmap/star/star2.md +262 -0
- package/docs/test/skillmap/star/star3.md +186 -0
- package/docs/test/skillmap/star/star4.md +162 -0
- package/docs/test/skillmap/star.md +86 -0
- package/docs/test/skillmap/story/joke-examples.md +41 -0
- package/docs/test/skillmap/story/story1.md +275 -0
- package/docs/test/skillmap/story/story2.md +289 -0
- package/docs/test/skillmap/story/story3.md +626 -0
- package/docs/test/skillmap/story/story4.md +1774 -0
- package/docs/test/skillmap/story.md +90 -0
- package/docs/test/tutorials/wakanda.md +421 -0
- package/docs/tutorials/wakanda-forever.md +558 -0
- package/package.json +4 -4
- package/targetconfig.json +2 -1
|
@@ -45,7 +45,7 @@ hint~
|
|
|
45
45
|
- :tree: From the ``||scene: Scene||`` category in the toolbox, grab <br/>
|
|
46
46
|
|
|
47
47
|
```block
|
|
48
|
-
|
|
48
|
+
carnival.addLabelTo("Whack-the-Mole", carnival.Areas.Bottom)
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
and snap it inside and at the very **end** of the
|
|
@@ -72,10 +72,10 @@ let myHammer: Sprite = null
|
|
|
72
72
|
scene.setBackgroundImage(assets.image`grid`)
|
|
73
73
|
myMole = sprites.create(assets.image`mole`, SpriteKind.Enemy)
|
|
74
74
|
myHammer = sprites.create(assets.image`hammer`, SpriteKind.Player)
|
|
75
|
-
controller.
|
|
76
|
-
|
|
75
|
+
controller.moveOnlyOnscreenWithArrows(myHammer, controller.Speeds.Fast)
|
|
76
|
+
carnival.startCountdownGame(15, carnival.WinTypes.Score)
|
|
77
77
|
//@highlight
|
|
78
|
-
|
|
78
|
+
carnival.addLabelTo("Whack-the-Mole", carnival.Areas.Bottom)
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
|
|
@@ -113,7 +113,7 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSp
|
|
|
113
113
|
let myMole: Sprite = null
|
|
114
114
|
let myHammer: Sprite = null
|
|
115
115
|
info.changeScoreBy(1)
|
|
116
|
-
sprites.
|
|
116
|
+
sprites.moveToRandomHoleOnGrid(myMole)
|
|
117
117
|
//@highlight
|
|
118
118
|
music.knock.play()
|
|
119
119
|
|
|
@@ -184,7 +184,7 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSp
|
|
|
184
184
|
let myMole: Sprite = null
|
|
185
185
|
let myHammer: Sprite = null
|
|
186
186
|
info.changeScoreBy(1)
|
|
187
|
-
sprites.
|
|
187
|
+
sprites.moveToRandomHoleOnGrid(myMole)
|
|
188
188
|
music.knock.play()
|
|
189
189
|
//@highlight
|
|
190
190
|
animation.runImageAnimation(
|
|
@@ -217,9 +217,9 @@ When your rubber hammer overlaps the mole, points should show up in the top-righ
|
|
|
217
217
|
|
|
218
218
|
**🎡 You've done it! 🎡**
|
|
219
219
|
|
|
220
|
-
You've
|
|
220
|
+
You've created a Whack-the-Mole game!
|
|
221
221
|
|
|
222
|
-
When you're ready, click **Done** to return to the skillmap
|
|
222
|
+
When you're ready, click **Done** to return to the skillmap so you can turn it into a game for two players!
|
|
223
223
|
|
|
224
224
|
|
|
225
225
|
|
|
@@ -235,6 +235,8 @@ false
|
|
|
235
235
|
)
|
|
236
236
|
myHammer = sprites.create(img`.`, SpriteKind.Player)
|
|
237
237
|
sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSprite) { info.changeScoreBy(1) })
|
|
238
|
+
carnival.addLabelTo("Whack-the-Mole", carnival.Areas.Bottom)
|
|
239
|
+
|
|
238
240
|
```
|
|
239
241
|
|
|
240
242
|
|
|
@@ -250,7 +252,7 @@ arcade-text=github:microsoft/arcade-text/
|
|
|
250
252
|
|
|
251
253
|
sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSprite) {
|
|
252
254
|
info.changeScoreBy(1)
|
|
253
|
-
sprites.
|
|
255
|
+
sprites.moveToRandomHoleOnGrid(myMole)
|
|
254
256
|
|
|
255
257
|
})
|
|
256
258
|
let myMole: Sprite = null
|
|
@@ -258,11 +260,11 @@ let myHammer: Sprite = null
|
|
|
258
260
|
scene.setBackgroundImage(assets.image`grid`)
|
|
259
261
|
myMole = sprites.create(assets.image`mole`, SpriteKind.Enemy)
|
|
260
262
|
myHammer = sprites.create(assets.image`hammer`, SpriteKind.Player)
|
|
261
|
-
controller.
|
|
262
|
-
|
|
263
|
+
controller.moveOnlyOnscreenWithArrows(myHammer, controller.Speeds.Fast)
|
|
264
|
+
carnival.startCountdownGame(15, carnival.WinTypes.Score)
|
|
263
265
|
|
|
264
266
|
game.onUpdateInterval(1000, function () {
|
|
265
|
-
sprites.
|
|
267
|
+
sprites.moveToRandomHoleOnGrid(myMole)
|
|
266
268
|
})
|
|
267
269
|
|
|
268
270
|
```
|
|
@@ -8,7 +8,7 @@ Your code from the last activity is already in the workspace.
|
|
|
8
8
|
|
|
9
9
|
Let's add to it to create a multiplayer game.
|
|
10
10
|
|
|
11
|
-

|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -82,11 +82,11 @@ into **an empty area** of your workspace.
|
|
|
82
82
|
|
|
83
83
|
~hint Show me how! 🕵🏽
|
|
84
84
|
|
|
85
|
-

|
|
86
86
|
|
|
87
87
|
hint~
|
|
88
88
|
|
|
89
|
-
Now, when player 2 presses
|
|
89
|
+
Now, when player 2 presses their A button (or the **U key** on the keyboard) the mole will hop to a new location.
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
|
|
@@ -106,13 +106,12 @@ controller.player2.onButtonEvent(ControllerButton.A, ControllerButtonEvent.Press
|
|
|
106
106
|
Now that player 2 moves the mole, we don't need to have it happen automatically.
|
|
107
107
|
|
|
108
108
|
|
|
109
|
-
- :mouse pointer:
|
|
109
|
+
- :mouse pointer: From the <br/>
|
|
110
|
+
``||game(noclick): on game update every [1000] ms||``
|
|
111
|
+
<br/>container already in the workspace, delete
|
|
110
112
|
```block
|
|
111
113
|
sprites.moveToRandomHoleOnGrid(myMole)
|
|
112
114
|
```
|
|
113
|
-
block from the <br/>
|
|
114
|
-
``||game(noclick): on game update every [1000] ms||``
|
|
115
|
-
<br/>container already in the workspace.
|
|
116
115
|
|
|
117
116
|
~hint How do I delete a block? 💡
|
|
118
117
|
|
|
@@ -130,7 +129,7 @@ hint~
|
|
|
130
129
|
|
|
131
130
|
~hint Click here to see how 🕵🏽
|
|
132
131
|
|
|
133
|
-

|
|
134
133
|
|
|
135
134
|
|
|
136
135
|
hint~
|
|
@@ -157,7 +156,7 @@ into the newly **empty** <br/>
|
|
|
157
156
|
|
|
158
157
|
~hint Click here to see how 🕵🏽
|
|
159
158
|
|
|
160
|
-

|
|
161
160
|
|
|
162
161
|
|
|
163
162
|
hint~
|
|
@@ -193,7 +192,7 @@ inside the ``||loops(noclick):on start||`` container, and change **best score**
|
|
|
193
192
|
~hint Show me how! 🕵🏽
|
|
194
193
|
|
|
195
194
|
|
|
196
|
-

|
|
197
196
|
|
|
198
197
|
hint~
|
|
199
198
|
|
|
@@ -243,8 +242,10 @@ You can change your values to make your game exactly the way you like.
|
|
|
243
242
|
- If player 2 wins too much, change the number of milliseconds they must wait from **1000** to **1500**.<br/>
|
|
244
243
|
- If you don't feel like you have long enough to play, change the countdown from **15** to **25** or **30** seconds. <br/>
|
|
245
244
|
|
|
245
|
+
---
|
|
246
|
+
|
|
246
247
|
|
|
247
|
-

|
|
248
249
|
|
|
249
250
|
hint~
|
|
250
251
|
|
|
@@ -268,7 +269,7 @@ You can change the instructions to whatever you want them to be.
|
|
|
268
269
|
~hint Show me how! 🕵🏽
|
|
269
270
|
|
|
270
271
|
|
|
271
|
-

|
|
272
273
|
|
|
273
274
|
hint~
|
|
274
275
|
|
|
@@ -341,6 +342,7 @@ controller.player2.onButtonEvent(ControllerButton.A, ControllerButtonEvent.Press
|
|
|
341
342
|
sprites.moveToRandomHoleOnGrid(myMole)
|
|
342
343
|
})
|
|
343
344
|
game.showLongText("Player 1: Use the arrow keys to move the hammer. Player 2: Press A to move the mole.", DialogLayout.Center)
|
|
345
|
+
carnival.addLabelTo("Whack-the-Mole", carnival.Areas.Bottom)
|
|
344
346
|
```
|
|
345
347
|
|
|
346
348
|
|