Skip to content

Commit 3e2e304

Browse files
committed
fire and cactus
1 parent c55760b commit 3e2e304

7 files changed

Lines changed: 313 additions & 157 deletions

File tree

.github/makecode/blocks.png

15 KB
Loading

images.g.jres

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

images.g.ts

Lines changed: 122 additions & 122 deletions
Large diffs are not rendered by default.

main.blocks

Lines changed: 124 additions & 0 deletions
Large diffs are not rendered by default.

main.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,18 +145,18 @@ scene.setBackgroundImage(img`
145145
hacker = sprites.create(assets.image`Temporary asset2`, SpriteKind.Player)
146146
hacker.setPosition(40, 90)
147147
controller.moveSprite(hacker, 80, 0)
148-
hacker.ay = 120
148+
hacker.ay = 150
149149
tiles.setTilemap(tilemap`level1`)
150150
scene.cameraFollowSprite(hacker)
151151
// else:
152152
// hacker.ay = 0
153153
// hacker.vy = 0
154154
game.onUpdate(function () {
155155
if (hacker.y < 50) {
156-
hacker.vy = 10
157-
hacker.ay = 120
156+
hacker.vy = 30
157+
hacker.ay = 150
158158
} else if (hacker.y <= 90) {
159-
hacker.ay = 120
159+
hacker.ay = 150
160160
}
161161
})
162162
game.onUpdateInterval(5000, function () {

tilemap.g.jres

Lines changed: 31 additions & 11 deletions
Large diffs are not rendered by default.

tilemap.g.ts

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ namespace myTiles {
88
export const tile2 = image.ofBuffer(hex``);
99
//% fixedInstance jres blockIdentity=images._tile
1010
export const tile3 = image.ofBuffer(hex``);
11+
//% fixedInstance jres blockIdentity=images._tile
12+
export const tile4 = image.ofBuffer(hex``);
13+
//% fixedInstance jres blockIdentity=images._tile
14+
export const tile5 = image.ofBuffer(hex``);
15+
//% fixedInstance jres blockIdentity=images._tile
16+
export const tile6 = image.ofBuffer(hex``);
1117

1218
helpers._registerFactory("tilemap", function(name: string) {
1319
switch(helpers.stringTrim(name)) {
@@ -49,25 +55,6 @@ namespace myTiles {
4955
. . . . . . . . . . . . . . . . . .
5056
. . . . . . . . . . . . . . . . . .
5157
`, [myTiles.transparency16,myTiles.tile1], TileScale.Sixteen);
52-
case "level1":
53-
case "level1":return tiles.createTilemap(hex`6e0010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004040404000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040404040000000000000000000404040404000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040404040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004040400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040404040400000000000000000000040404000000000000000000000000000000000000000000000000000000000000000000000000000000000004040404040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004040400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000030000000000000000000000000000000300000000000000000000000000000003000000000000000000000000000000030000000000000000000000000000000300000000000000000000000000000003000001020202020202020202020202020202010202020202020202020202020202020102020202020202020202020202020201020202020202020202020202020202010202020202020202020202020202020102020202020202020202020202020201020202020202020202020202020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000`, img`
54-
..............................................................................................................
55-
..............................................................................................................
56-
..............................................................................................................
57-
..............................................................................................................
58-
........................................................2222..................................................
59-
..............................................................................................................
60-
...................................2222.........22222.........................................................
61-
.............................................................................................2222.............
62-
...............................................................222............................................
63-
..........................22222..........222.........................................22222....................
64-
.....................................................................................................222......
65-
..............................................................................................................
66-
..............................................................................................................
67-
...........2...............2...............2...............2...............2...............2...............2..
68-
22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
69-
..............................................................................................................
70-
`, [myTiles.transparency16,sprites.castle.tilePath1,sprites.castle.tilePath2,sprites.castle.saplingOak,myTiles.tile1], TileScale.Sixteen);
7158
case "level4":
7259
case "level4":return tiles.createTilemap(hex`1000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000`, img`
7360
. . . . . . . . . . . . . . . .
@@ -87,6 +74,25 @@ namespace myTiles {
8774
. . . . . . . . . . . . . . . .
8875
. . . . . . . . . . . . . . . .
8976
`, [myTiles.transparency16], TileScale.Sixteen);
77+
case "level1":
78+
case "level1":return tiles.createTilemap(hex`6e0010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004040404000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040404040000000000000000000404040404000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040404040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004040400000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040404040400000000000000000000040404000000000000000000000000000000000000000000000000000000000000000000000000000000000004040404040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004040400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000500000000000000030000000000000006060000000000000300000000000000050000000000000003000000000000000000000500000000030000000000060606000000000000000300000000000500000000000600000003000001020202020202020202020202020202010202020202020202020202020202020102020202020202020202020202020201020202020202020202020202020202010202020202020202020202020202020102020202020202020202020202020201020202020202020202020202020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000`, img`
79+
..............................................................................................................
80+
..............................................................................................................
81+
..............................................................................................................
82+
..............................................................................................................
83+
........................................................2222..................................................
84+
..............................................................................................................
85+
...................................2222.........22222.........................................................
86+
.............................................................................................2222.............
87+
...............................................................222............................................
88+
..........................22222..........222.........................................22222....................
89+
.....................................................................................................222......
90+
..............................................................................................................
91+
..............................................................................................................
92+
...........2...............2...............2...............2...............2...............2...............2..
93+
22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
94+
..............................................................................................................
95+
`, [myTiles.transparency16,sprites.castle.tilePath1,sprites.castle.tilePath2,sprites.castle.saplingOak,myTiles.tile1,myTiles.tile5,myTiles.tile6], TileScale.Sixteen);
9096
}
9197
return null;
9298
})
@@ -99,6 +105,12 @@ namespace myTiles {
99105
case "tile0":
100106
case "tile2":return tile2;
101107
case "tile3":return tile3;
108+
case "tile5":
109+
case "tile4":return tile4;
110+
case "cactus":
111+
case "tile5":return tile5;
112+
case "fire":
113+
case "tile6":return tile6;
102114
}
103115
return null;
104116
})

0 commit comments

Comments
 (0)