Skip to content

Commit a937614

Browse files
Make level 5 possible and change color palate when change gravity
1 parent a006280 commit a937614

6 files changed

Lines changed: 19 additions & 5 deletions

File tree

.github/makecode/blocks.png

12.5 KB
Loading

.github/makecode/blocksdiff.png

-305 KB
Loading

main.blocks

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

main.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ function level_5 () {
2828
scene.onOverlapTile(SpriteKind.Player, assets.tile`gravity_down`, function (sprite, location) {
2929
gravity = Math.abs(gravity) * 1
3030
sprite_player.ay = gravity
31+
timer.throttle("fade", 400, function () {
32+
timer.background(function () {
33+
color.startFade(color.Poke, color.Black, 200)
34+
color.pauseUntilFadeDone()
35+
color.startFade(color.Black, color.originalPalette, 200)
36+
})
37+
})
3138
})
3239
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
3340
if (in_game) {
@@ -37,6 +44,13 @@ controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
3744
scene.onOverlapTile(SpriteKind.Player, assets.tile`gravity_up0`, function (sprite, location) {
3845
gravity = Math.abs(gravity) * -1
3946
sprite_player.ay = gravity
47+
timer.throttle("fade", 400, function () {
48+
timer.background(function () {
49+
color.startFade(color.originalPalette, color.Black, 200)
50+
color.pauseUntilFadeDone()
51+
color.startFade(color.Black, color.Poke, 200)
52+
})
53+
})
4054
})
4155
scene.onOverlapTile(SpriteKind.Player, assets.tile`top_spike`, function (sprite, location) {
4256
sprite.destroy(effects.disintegrate, 100)

tilemap.g.jres

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tilemap.g.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,16 +410,16 @@ namespace myTiles {
410410
. . . . . . . . . . . . . . . .
411411
`, [myTiles.transparency8], TileScale.Eight);
412412
case "level_5":
413-
case "level21":return tiles.createTilemap(hex`c8000f0001010101010101010101010105050505050505050505050505050505050505050505050505010101010101010101010101010505050505050505050505050505050505050505050505050101010101010101010101010101010101010101050101010101010101010101010101010101010105050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050101010101010101010101010000000000000000000000000000000000000000000000000000010101010101010101010100000300000300000300000300000300000300000300000300000101010101010101010101010101010101010100010101010101010101010101010101010101000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000010101010101010101010100000000000000000000000000000000000000000000000000000000010101010101010101000000000000000000000000000000000000000000000000000000000101010101010101010101010101010101010001010101010101010101010101010101010000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000303030303030303030303030303030303030303030303030303030303030303030301010101010101010101000000000000000000000000000000000000000000000000000000000000010101010101010000000000000000000000000000000000000000000000000000000000000101010101010101010101010101010101000101010101010101010101010101010100000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000008000000000000000000050505000008000000000000000000000000000000000101010101010101010000000000000000000000000000000000000000000000000000000000000000010101010100000000000000000000000000000000000000000000000000000000000000000101010101010101010101010000000000000008010101010101010101010101000000000000000000000000000003000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101000000000000000000000000000000000000000000000000000000000000000000000101010101010101010101000101000000010001010101010101010101010000000000000000000000000000000000000300000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000008080808080800000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000101010101010101010100010101010101000101010101010101010100000000000000000000000000000000000000000000030000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000808080808080000000000000000000000000000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000000000000080000000101010101010001010101010100010101010101000000000000000000000000000000000000000000000000000000000003000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000001010100010100000001000101010101010001010000000100010101000000000000000000000000000000000000000000000000000000000300000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007070700000006000000000000000000000000000000000000000000000000000000000000000000000000000000000001010100000000000000000000000000000000000000000000000000000000000000000000010101010000000000000007010101010101000000000000000701010101000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000707070000000101010101010101010000000000000000000000000000000000000000000000000000000000000000010101010100000000000000000000000000000000000000000000000000000000000000000101010101010101010001010101010101010101010101000101010101010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000101010101010101010100000000000000000000000000000000000000000000000000000000000001010101010101000000000000000000000000000000000000000000000000000000000000010101010101010101010001010101010101010101010101000101010101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040404000007000000000000000000000404040000070000040404000900010101010101010101010100000000000000000000000000000000000000000000000000000000010101010101010101000000000000000000000000000000000000000000000000000000000101010101010101010101000101010101010101010101010100010101010101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000202020202020202020202020202020202020202020202020202020202020202020201010101010101010101010100000200000200000200000200000200000200000200000200000101010101010101010101000000000000000000000000000000000000000000000000000001010101010101010101010100010101010101010101010101010001010101010101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010101010101010101010404040404040404040404040404040404040404040404040401010101010101010101010101040404040404040404040404040404040404040404040404010101010101010101010101010401010101010101010101010101040101010101010101010101010404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404`, img`
413+
case "level21":return tiles.createTilemap(hex`c8000f0001010101010101010101010105050505050505050505050505050505050505050505050505010101010101010101010101010505050505050505050505050505050505050505050505050101010101010101010101010101010101010101050101010101010101010101010101010101010105050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050101010101010101010101010000000000000000000000000000000000000000000000000000010101010101010101010100000300000300000300000300000300000300000300000300000101010101010101010101010101010101010100010101010101010101010101010101010101000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000010101010101010101010100000000000000000000000000000000000000000000000000000000010101010101010101000000000000000000000000000000000000000000000000000000000101010101010101010101010101010101010001010101010101010101010101010101010000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000303030303030303030303030303030303030303030303030303030303030303030301010101010101010101000000000000000000000000000000000000000000000000000000000000010101010101010000000000000000000000000000000000000000000000000000000000000101010101010101010101010101010101000101010101010101010101010101010100000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000008000000000000000000050505000008000000000000000000000000000000000101010101010101010000000000000000000000000000000000000000000000000000000000000000010101010100000000000000000000000000000000000000000000000000000000000000000101010101010101010101010000000000000008010101010101010101010101000000000000000000000000000003000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101000000000000000000000000000000000000000000000000000000000000000000000101010101010101010101000101000000010001010101010101010101010000000000000000000000000000000000000300000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000008080808080800000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000001010101010101010100010101010101000101010101010101010100000000000000000000000000000000000000000000030000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000808080808080000000000000000000000000000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000000000000080000000101010101010001010101010100010101010101000000000000000000000000000000000000000000000000000000000003000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000000000000001010100010100000001000101010101010001010000000100010101000000000000000000000000000000000000000000000000000000000300000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007070700000006000000000000000000000000000000000000000000000000000000000000000000000000000000000001010100000000000000000000000000000000000000000000000000000000000000000000010101010000000000000007010101010101000000000000000701010101000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000707070000000101010101010101010000000000000000000000000000000000000000000000000000000000000000010101010100000000000000000000000000000000000000000000000000000000000000000101010101010101010001010101010101010101010101000101010101010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000101010101010101010100000000000000000000000000000000000000000000000000000000000001010101010101000000000000000000000000000000000000000000000000000000000000010101010101010101010001010101010101010101010101000101010101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040404000007000000000000000000000404040000070000040404000900010101010101010101010100000000000000000000000000000000000000000000000000000000010101010101010101000000000000000000000000000000000000000000000000000000000101010101010101010101000101010101010101010101010100010101010101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000202020202020202020202020202020202020202020202020202020202020202020201010101010101010101010100000200000200000200000200000200000200000200000200000101010101010101010101000000000000000000000000000000000000000000000000000001010101010101010101010100010101010101010101010101010001010101010101010101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010101010101010101010404040404040404040404040404040404040404040404040401010101010101010101010101040404040404040404040404040404040404040404040404010101010101010101010101010401010101010101010101010101040101010101010101010101010404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404`, img`
414414
222222222222.........................2222222222222........................22222222222222222222.2222222222222222222......................................................................................
415415
222222222222..........................22222222222..2..2..2..2..2..2..2..2..2222222222222222222.222222222222222222..2...............................................2....................................
416416
22222222222............................222222222............................222222222222222222.22222222222222222......2.........................................2.....2222222222222222222222222222222222
417417
2222222222..............................2222222..............................22222222222222222.2222222222222222..........2...................................2..........................................
418418
222222222................................22222................................222222222222........222222222222..............2.............................2.............................................
419419
..........................................222..................................22222222222.22...2.22222222222..................2.......................2................................................
420-
...........................................2....................................2222222222.222222.2222222222......................2.................2...................................................
420+
...........................................2.....................................222222222.222222.2222222222......................2.................2...................................................
421421
....................................................................................222222.222222.222222.............................2...........2......................................................
422-
...........................................2....................................222.22...2.222222.22...2.222............................2.....2.........................................................
422+
..........................................22....................................222.22...2.222222.22...2.222............................2.....2.........................................................
423423
..........................................222..................................2222........222222........2222..............................2............................................................
424424
222222222................................22222................................222222222.2222222222222.22222222..........................................................................................
425425
2222222222..............................2222222..............................2222222222.2222222222222.222222222.........................................................................................

0 commit comments

Comments
 (0)