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
package/built/targetlight.json
CHANGED
|
@@ -505,11 +505,11 @@
|
|
|
505
505
|
}
|
|
506
506
|
],
|
|
507
507
|
"versions": {
|
|
508
|
-
"branch": "v1.11.
|
|
509
|
-
"tag": "v1.11.
|
|
510
|
-
"commits": "https://github.com/microsoft/pxt-arcade/commits/
|
|
511
|
-
"target": "1.11.
|
|
512
|
-
"pxt": "8.4.
|
|
508
|
+
"branch": "v1.11.23",
|
|
509
|
+
"tag": "v1.11.23",
|
|
510
|
+
"commits": "https://github.com/microsoft/pxt-arcade/commits/82858f8e68204e02a55df782b9438068e7e93248",
|
|
511
|
+
"target": "1.11.23",
|
|
512
|
+
"pxt": "8.4.17"
|
|
513
513
|
},
|
|
514
514
|
"blocksprj": {
|
|
515
515
|
"id": "blocksprj",
|
package/docs/hero-banner.md
CHANGED
|
@@ -5,7 +5,12 @@ Here are some cool activities to get you started with your @boardname@!
|
|
|
5
5
|
## Intro Content
|
|
6
6
|
|
|
7
7
|
### ~ codecard
|
|
8
|
-
|
|
8
|
+
* name: Stand with Wakanda
|
|
9
|
+
* buttonLabel: Build now
|
|
10
|
+
* imageUrl: /static/banners/wakanda-banner.png
|
|
11
|
+
* url: https://arcade.makecode.com/#tutorial:/tutorials/wakanda-forever
|
|
12
|
+
* cardType: link
|
|
13
|
+
---
|
|
9
14
|
* name: Play the Monster Racer Tutorial
|
|
10
15
|
* buttonLabel: Try Now
|
|
11
16
|
* imageUrl: /static/banners/racer-banner.png
|
|
@@ -28,4 +33,4 @@ Here are some cool activities to get you started with your @boardname@!
|
|
|
28
33
|
* url: https://www.twitch.tv/msmakecode
|
|
29
34
|
* cardType: link
|
|
30
35
|
|
|
31
|
-
### ~
|
|
36
|
+
### ~
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -65,88 +65,34 @@ hint~
|
|
|
65
65
|
|
|
66
66
|
## {3. Add Second Player}
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
**You'll need to repeat your past steps to add a second player.**
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
We've connected all of the blocks you need inside the toolbox. Can you figure out what you need to do to get Player 2 working?
|
|
71
71
|
|
|
72
|
-
**
|
|
72
|
+
💡 **Tip:** _If you need more help, click through the steps for details._
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
## {4. Add
|
|
77
|
+
## {4. Add the Sprites}
|
|
78
78
|
|
|
79
|
-
- :
|
|
80
|
-
``||controller:on [B] button [Pressed]||`` <br/>
|
|
81
|
-
block to the workspace and also add a point for **player 2** each time it's clicked.
|
|
79
|
+
- :bolt: Look under ``||simplified:Simplified||`` for the bundle of code you need to add to **the end of** the ``||loops(noclick):on start||`` container.
|
|
82
80
|
|
|
81
|
+
- :mouse pointer: Click the empty grey boxes to choose the blue balloon and blue mouse images.
|
|
83
82
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
- :paper plane: From the ``||controller: Controller||`` category in the toolbox, grab the<br/>
|
|
87
|
-
``||controller(noclick): on [B] button [pressed]||`` <br/>
|
|
88
|
-
bundle and drop it onto an empty area of your workspace.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
hint~
|
|
83
|
+
💡 **Tip:** _You'll can also change the **x** value for the Player 1 sprites to move them left a bit._
|
|
92
84
|
|
|
93
85
|
|
|
94
86
|
~hint Show me... 🕵🏽
|
|
95
87
|
|
|
88
|
+

|
|
96
89
|
|
|
97
|
-

|
|
98
90
|
|
|
99
91
|
hint~
|
|
100
92
|
|
|
101
93
|
|
|
102
94
|
#### ~ tutorialhint
|
|
103
|
-
```
|
|
104
|
-
controller.B.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
105
|
-
info.player2.changeScoreBy(1)
|
|
106
|
-
})
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
## {5. Add the Balloon}
|
|
111
|
-
|
|
112
|
-
- :lightbulb: Can you figure out how to add the second balloon for the second player?
|
|
113
|
-
|
|
114
|
-
_(You'll also need to move player 1 to the left, and set player 2 further right.)_
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
~hint Tell me more... 🕵🏽
|
|
118
|
-
|
|
119
|
-
- :paper plane: From the ``||sprites: Sprites||`` category in the toolbox, grab <br/>
|
|
120
|
-
``||variables(sprites): set [myBalloon2] to sprite [ ] of kind [Player]||`` <br/>
|
|
121
|
-
and snap it inside at the **end** of the
|
|
122
|
-
``||loops(noclick): on start||``
|
|
123
|
-
block already in your workspace.
|
|
124
|
-
|
|
125
|
-
- :mouse pointer: Select the image of the blue balloon.
|
|
126
|
-
|
|
127
|
-
- :mouse pointer: Grab <br/>
|
|
128
|
-
``||sprites: set [myBalloon2] position to x [110] y [93]||`` <br/>
|
|
129
|
-
and snap it inside at the **end** of the
|
|
130
|
-
``||loops(noclick): on start||``
|
|
131
|
-
block already in your workspace.
|
|
132
|
-
|
|
133
|
-
- :mouse pointer: Change the positions for the original **myBalloon** and **myMouse** to each have an x value of **50**.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
hint~
|
|
137
|
-
|
|
138
|
-
~hint Show me! 🕵🏽
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-

|
|
142
|
-
|
|
143
|
-
hint~
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
#### ~ tutorialhint
|
|
148
|
-
```blocks
|
|
149
|
-
let myBalloon2: Sprite = null
|
|
95
|
+
```block
|
|
150
96
|
let myMouse: Sprite = null
|
|
151
97
|
let myBalloon: Sprite = null
|
|
152
98
|
carnival.startCountdownGame(20, carnival.WinTypes.Score)
|
|
@@ -156,196 +102,99 @@ myBalloon.setPosition(50, 93)
|
|
|
156
102
|
let myBooth = sprites.create(assets.image`booth`, SpriteKind.Booth)
|
|
157
103
|
myMouse = sprites.create(assets.image`mouse1-up`, SpriteKind.Mouse)
|
|
158
104
|
myMouse.setPosition(50, 93)
|
|
159
|
-
|
|
160
|
-
myBalloon2.
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
## {6. Add the Mouse}
|
|
168
|
-
|
|
169
|
-
- :lightbulb: Now it's time to add the second mouse in front of the second balloon.
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
~hint Tell me more... 🕵🏽
|
|
173
|
-
|
|
174
|
-
- :paper plane: From the ``||sprites: Sprites||`` category in the toolbox, grab <br/>
|
|
175
|
-
``||variables(sprites): set [myMouse2] to sprite [ ] of kind [Mouse]||`` <br/>
|
|
176
|
-
and snap it inside at the **end** of the
|
|
177
|
-
``||loops(noclick): on start||``
|
|
178
|
-
block already in your workspace.
|
|
179
|
-
|
|
180
|
-
- :mouse pointer: Select the **mouse2-up** image.
|
|
181
|
-
|
|
182
|
-
- :mouse pointer: Grab <br/>
|
|
183
|
-
``||sprites: set [myMouse2] position to x [110] y [93]||`` <br/>
|
|
184
|
-
block and snap it inside at the **end** of the
|
|
185
|
-
``||loops(noclick): on start||``
|
|
186
|
-
block already in your workspace.
|
|
187
|
-
|
|
188
|
-
hint~
|
|
189
|
-
|
|
190
|
-
~hint Show me! 🕵🏽
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-

|
|
194
|
-
|
|
195
|
-
hint~
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
```blockconfig.local
|
|
200
|
-
let myMouse2 = sprites.create(img`.`, SpriteKind.Mouse)
|
|
201
|
-
myMouse2.setPosition(110, 93)
|
|
202
|
-
myMouse2.setImage(img`.`)
|
|
203
|
-
controller.B.onEvent(ControllerButtonEvent.Released, function () {
|
|
204
|
-
myMouse2.setImage(img`.`)
|
|
105
|
+
simplified.wrap(function () {
|
|
106
|
+
let myBalloon2 = sprites.create(img`.`, SpriteKind.Player)
|
|
107
|
+
myBalloon2.setPosition(110, 93)
|
|
108
|
+
let myMouse2 = sprites.create(img`.`, SpriteKind.Mouse)
|
|
109
|
+
myMouse2.setPosition(110, 93)
|
|
205
110
|
})
|
|
206
|
-
```
|
|
207
111
|
|
|
208
|
-
#### ~ tutorialhint
|
|
209
|
-
```blocks
|
|
210
|
-
let myBalloon2: Sprite = null
|
|
211
|
-
let myMouse: Sprite = null
|
|
212
|
-
let myBalloon: Sprite = null
|
|
213
|
-
let myMouse2: Sprite = null
|
|
214
|
-
carnival.startCountdownGame(20, carnival.WinTypes.Score)
|
|
215
|
-
scene.setBackgroundColor(1)
|
|
216
|
-
myBalloon = sprites.create(assets.image`balloon-1`, SpriteKind.Player)
|
|
217
|
-
myBalloon.setPosition(50, 93)
|
|
218
|
-
let myBooth = sprites.create(assets.image`booth`, SpriteKind.Booth)
|
|
219
|
-
myMouse = sprites.create(assets.image`mouse1-up`, SpriteKind.Mouse)
|
|
220
|
-
myMouse.setPosition(50, 93)
|
|
221
|
-
myBalloon2 = sprites.create(assets.image`balloon-2`, SpriteKind.Player)
|
|
222
|
-
myBalloon2.setPosition(110, 93)
|
|
223
|
-
myMouse2 = sprites.create(assets.image`mouse2-up`, SpriteKind.Mouse)
|
|
224
|
-
myMouse2.setPosition(110, 93)
|
|
225
112
|
```
|
|
226
113
|
|
|
227
114
|
|
|
228
115
|
|
|
229
116
|
|
|
230
|
-
## {7. Push Mouse 2}
|
|
231
117
|
|
|
232
|
-
|
|
118
|
+
## {8. Play Your Game!}
|
|
233
119
|
|
|
234
|
-
|
|
120
|
+
**Take a look!**
|
|
235
121
|
|
|
236
|
-
|
|
122
|
+
- :binoculars: Look at your project in the game window. <br/><br/>
|
|
123
|
+
You should see that a second mouse and balloon have appeared.
|
|
237
124
|
|
|
238
125
|
|
|
239
|
-
~hint Tell me more... 🕵🏽
|
|
240
126
|
|
|
241
|
-
- :game: From the ``||controller: Controller||`` category in the toolbox, grab the <br/>
|
|
242
|
-
``||controller(noclick):on [B] button [Released]||``<br/>
|
|
243
|
-
bundle and drop it into an empty area of the workspace.
|
|
244
127
|
|
|
245
|
-
- :mouse pointer: Click the empty box and choose **mouse2-up** from **My Assets**.
|
|
246
128
|
|
|
247
|
-
- :paper plane: From the ``||sprites: Sprites||`` category in the toolbox, grab another <br/>
|
|
248
|
-
``||sprites: set [myMouse2] image to [ ]||`` <br/>
|
|
249
|
-
block and snap it into the <br/>
|
|
250
|
-
``||controller(noclick): on [B] button [Pressed]||`` <br/>
|
|
251
|
-
block already in your workspace.
|
|
252
129
|
|
|
253
|
-
|
|
130
|
+
## {5. Player 2 Pressed}
|
|
254
131
|
|
|
132
|
+
- :game: Now look under ``||controller:Controller||`` for the blocks you need to allow the second mouse to move when Player 2 presses their **A button**.
|
|
255
133
|
|
|
256
|
-
|
|
134
|
+
- :mouse pointer: Click the empty grey box to choose the picture of the second mouse pressing the handle.
|
|
257
135
|
|
|
258
|
-
~hint Show me! 🕵🏽
|
|
259
136
|
|
|
137
|
+
~hint Show me! 🕵🏽
|
|
260
138
|
|
|
261
|
-

|
|
262
139
|
|
|
263
|
-
|
|
140
|
+

|
|
264
141
|
|
|
265
142
|
|
|
143
|
+
hint~
|
|
266
144
|
|
|
267
|
-
```blockconfig.local
|
|
268
|
-
let myMouse2 = sprites.create(img`.`, SpriteKind.Mouse)
|
|
269
|
-
myMouse2.setPosition(110, 93)
|
|
270
|
-
myMouse2.setImage(img`.`)
|
|
271
|
-
controller.B.onEvent(ControllerButtonEvent.Released, function () {
|
|
272
|
-
myMouse2.setImage(img`.`)
|
|
273
|
-
})
|
|
274
|
-
```
|
|
275
145
|
|
|
276
146
|
|
|
277
147
|
#### ~ tutorialhint
|
|
278
148
|
```blocks
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
controller.
|
|
149
|
+
let myBalloon2: Sprite = null
|
|
150
|
+
let myMouse2: Sprite = null
|
|
151
|
+
controller.player2.onButtonEvent(ControllerButton.A, ControllerButtonEvent.Pressed, function () {
|
|
282
152
|
info.player2.changeScoreBy(1)
|
|
283
153
|
myMouse2.setImage(assets.image`mouse2-down`)
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
controller.B.onEvent(ControllerButtonEvent.Released, function () {
|
|
287
|
-
let myMouse2: Sprite = null
|
|
288
|
-
myMouse2.setImage(assets.image`mouse2-up`)
|
|
154
|
+
scaling.scaleByPixels(myBalloon2, 1, ScaleDirection.Uniformly, ScaleAnchor.Bottom)
|
|
289
155
|
})
|
|
290
156
|
```
|
|
291
157
|
|
|
292
158
|
|
|
293
|
-
## {8. Inflate the Balloon}
|
|
294
159
|
|
|
295
160
|
|
|
296
|
-
- :lightbulb: Time to make sure that the second balloon gets bigger with each step.
|
|
297
161
|
|
|
162
|
+
## {6. Mouse Up}
|
|
298
163
|
|
|
299
|
-
|
|
164
|
+
- :game: Now look under ``||controller:Controller||`` for the blocks you need to make the second mouse return to normal when Player 2 releases the **A button**.
|
|
300
165
|
|
|
301
|
-
- :
|
|
302
|
-
``||scaling: change [myBalloon2] scale by [1] pixels [uniformly] anchor [bottom]|| `` <br/>
|
|
303
|
-
and snap it into the <br/>
|
|
304
|
-
``||controller(noclick): on [B] button [pressed]||`` <br/>
|
|
305
|
-
block already in the workspace.
|
|
166
|
+
- :mouse pointer: Click the empty grey box to choose the picture of the second mouse releasing the handle.
|
|
306
167
|
|
|
307
168
|
|
|
308
|
-
hint~
|
|
309
|
-
|
|
310
169
|
~hint Show me! 🕵🏽
|
|
311
170
|
|
|
171
|
+

|
|
312
172
|
|
|
313
|
-

|
|
314
173
|
|
|
315
174
|
hint~
|
|
316
175
|
|
|
317
176
|
|
|
318
177
|
|
|
319
178
|
```blockconfig.local
|
|
320
|
-
let myMouse2 =
|
|
321
|
-
|
|
322
|
-
myMouse2.setImage(img`.`)
|
|
323
|
-
controller.B.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
324
|
-
info.player2.changeScoreBy(1)
|
|
325
|
-
myMouse2.setImage(img`.`)
|
|
326
|
-
scaling.scaleByPixels(myBalloon2, 1, ScaleDirection.Uniformly, ScaleAnchor.Bottom)
|
|
179
|
+
let myMouse2: Sprite = null
|
|
180
|
+
controller.player2.onButtonEvent(ControllerButton.A, ControllerButtonEvent.Released, function () {
|
|
181
|
+
myMouse2.setImage(img`.`)
|
|
327
182
|
})
|
|
328
183
|
```
|
|
329
184
|
|
|
330
|
-
|
|
331
185
|
#### ~ tutorialhint
|
|
332
186
|
```blocks
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
info.player2.changeScoreBy(1)
|
|
337
|
-
myMouse2.setImage(assets.image`mouse2-down`)
|
|
338
|
-
scaling.scaleByPixels(myBalloon2, 1, ScaleDirection.Uniformly, ScaleAnchor.Bottom)
|
|
339
|
-
})
|
|
340
|
-
|
|
341
|
-
controller.B.onEvent(ControllerButtonEvent.Released, function () {
|
|
342
|
-
myMouse2.setImage(assets.image`mouse2-up`)
|
|
187
|
+
let myMouse2: Sprite = null
|
|
188
|
+
controller.player2.onButtonEvent(ControllerButton.A, ControllerButtonEvent.Released, function () {
|
|
189
|
+
myMouse2.setImage(assets.image`mouse2-up`)
|
|
343
190
|
})
|
|
344
191
|
```
|
|
345
192
|
|
|
346
193
|
|
|
347
194
|
|
|
348
195
|
|
|
196
|
+
|
|
197
|
+
|
|
349
198
|
## {8. Play Your Game!}
|
|
350
199
|
|
|
351
200
|
**Try your game!**
|
|
@@ -359,46 +208,36 @@ Find a friend and have them press the (A) button or **space bar** while you pres
|
|
|
359
208
|
|
|
360
209
|
|
|
361
210
|
|
|
362
|
-
|
|
363
|
-
|
|
364
211
|
## {9. Add a Label}
|
|
365
212
|
|
|
366
|
-
Last step
|
|
213
|
+
**Last step!**
|
|
367
214
|
|
|
368
|
-
- :
|
|
215
|
+
- :ticket: From ``||carnival:Carnival||``, add
|
|
216
|
+
```block
|
|
217
|
+
carnival.addLabelTo("Burstin' Balloons", carnival.Areas.Mid)
|
|
218
|
+
```
|
|
219
|
+
to **the end** of the ``||loops(noclick):on start||`` container to put a label on the booth so everyone knows the name of the game!
|
|
369
220
|
|
|
370
221
|
**Play your finished game a few times! Who can get the best 2 out of three?**
|
|
371
222
|
|
|
372
223
|
|
|
373
|
-
~hint Tell me more... 🕵🏽
|
|
374
224
|
|
|
375
|
-
- :arrows alternate vertical: From the ``||scene: Scene||`` category in the toolbox, grab <br/>
|
|
376
|
-
``||scene: add label [Burstin' Balloons] to [middle] of window || `` <br/>
|
|
377
|
-
and snap it into the **top** of the ``||loops(noclick): on start||``
|
|
378
|
-
block already in the workspace.
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
hint~
|
|
382
|
-
|
|
383
|
-
💡 ** Tip:** _Now that you have someone to race against, you can right-click <br/>
|
|
384
|
-
``||info: start countdown [20] (s) and game over [high score]||``<br/>
|
|
385
|
-
inside ``||loops(noclick): on start||`` and choose **Delete Blocks**._
|
|
386
225
|
|
|
387
226
|
~hint Show me! 🕵🏽
|
|
388
227
|
|
|
228
|
+

|
|
389
229
|
|
|
390
|
-

|
|
391
230
|
|
|
392
231
|
hint~
|
|
393
232
|
|
|
394
233
|
|
|
395
234
|
|
|
396
235
|
```blockconfig.local
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
236
|
+
simplified.wrap(function () {
|
|
237
|
+
let myBalloon3 = sprites.create(img`.`, SpriteKind.Player)
|
|
238
|
+
myBalloon3.setPosition(110, 93)
|
|
239
|
+
let myMouse3 = sprites.create(img`.`, SpriteKind.Mouse)
|
|
240
|
+
myMouse3.setPosition(110, 93)
|
|
402
241
|
})
|
|
403
242
|
```
|
|
404
243
|
|
|
@@ -431,7 +270,7 @@ carnival.addLabelTo("Burstin' Balloons", carnival.Areas.Mid)
|
|
|
431
270
|
|
|
432
271
|
**🥳 You've done it 🥳**
|
|
433
272
|
|
|
434
|
-
You've finished
|
|
273
|
+
You've finished your two-player game!
|
|
435
274
|
|
|
436
275
|
When you're ready, click **Done** to return to the skillmap and click the button in the side panel to share your game with friends!
|
|
437
276
|
|
|
@@ -450,17 +289,38 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Booth, function (sprite, otherSp
|
|
|
450
289
|
carnival.onGameOverExpanded(carnival.WinTypes.Multi)
|
|
451
290
|
myMouse2.setImage(img`.`)
|
|
452
291
|
|
|
453
|
-
controller.
|
|
292
|
+
controller.player2.onButtonEvent(ControllerButton.A, ControllerButtonEvent.Pressed, function () {
|
|
454
293
|
info.player2.changeScoreBy(1)
|
|
294
|
+
myMouse2.setImage(img`.`)
|
|
295
|
+
scaling.scaleByPixels(myBalloon2, 1, ScaleDirection.Uniformly, ScaleAnchor.Bottom)
|
|
455
296
|
})
|
|
456
297
|
|
|
457
298
|
carnival.addLabelTo("Burstin' Balloons", carnival.Areas.Mid)
|
|
299
|
+
|
|
300
|
+
simplified.wrap(function () {
|
|
301
|
+
myBalloon2 = sprites.create(img`.`, SpriteKind.Player)
|
|
302
|
+
myBalloon2.setPosition(110, 93)
|
|
303
|
+
myMouse2 = sprites.create(img`.`, SpriteKind.Mouse)
|
|
304
|
+
myMouse2.setPosition(110, 93)
|
|
305
|
+
})
|
|
306
|
+
|
|
307
|
+
controller.player2.onButtonEvent(ControllerButton.A, ControllerButtonEvent.Pressed, function () {
|
|
308
|
+
info.player2.changeScoreBy(1)
|
|
309
|
+
scaling.scaleByPixels(myBalloon2, ScaleDirection.Uniformly, ScaleAnchor.Bottom)
|
|
310
|
+
myMouse2.setImage(img`.`)
|
|
311
|
+
})
|
|
312
|
+
controller.player2.onButtonEvent(ControllerButton.A, ControllerButtonEvent.Released, function () {
|
|
313
|
+
myMouse2.setImage(img`.`)
|
|
314
|
+
})
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
458
318
|
```
|
|
459
319
|
|
|
460
320
|
|
|
461
321
|
```package
|
|
462
322
|
pxt-sprite-scaling=github:microsoft/pxt-common-packages/libs/sprite-scaling
|
|
463
|
-
carnival=github:microsoft/arcade-
|
|
323
|
+
carnival=github:microsoft/arcade-carnival
|
|
464
324
|
simple-blocks=github:microsoft/arcade-tutorial-extensions/simple-blocks/
|
|
465
325
|
```
|
|
466
326
|
|
|
@@ -494,6 +354,20 @@ myMouse.setPosition(80, 93)
|
|
|
494
354
|
```
|
|
495
355
|
|
|
496
356
|
|
|
357
|
+
```customts
|
|
358
|
+
namespace simplified{
|
|
359
|
+
/**
|
|
360
|
+
* just run the code
|
|
361
|
+
*/
|
|
362
|
+
//% block="create player"
|
|
363
|
+
//% handlerStatement=1
|
|
364
|
+
export function wrap(handler: () => void) {
|
|
365
|
+
handler();
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
|
|
497
371
|
|
|
498
372
|
|
|
499
373
|
```assetjson
|