-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.ts
29 lines (29 loc) · 1.07 KB
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
scene.onOverlapTile(SpriteKind.Player, sprites.dungeon.doorLockedNorth, function (sprite, location) {
game.over(true)
})
scene.onOverlapTile(SpriteKind.Player, sprites.dungeon.collectibleRedCrystal, function (sprite, location) {
game.splash("You Died", "You tried to swim in the lava")
game.over(false)
})
tiles.setCurrentTilemap(tilemap`層級3`)
let mySprite = sprites.create(img`
. . . . . . . . . . . . . .
. . . . a a a a a a . . . .
. . . a 1 1 1 1 1 1 a . . .
. . . a 1 1 1 1 1 1 a . . .
. . . a 1 1 1 1 1 1 a . . .
. . . a 1 1 1 1 1 1 a . . .
. . . a 1 1 1 1 1 1 a . . .
. . . a 1 1 1 1 1 1 a . . .
. . . . a a a a a a . . . .
. . . . . . a a . . . . . .
. . . . . . a a . . . . . .
. . . . . . a a . . . . . .
. . . a a a a a a a a . . .
. . . . . . a a . . . . . .
. . . . . . a a . . . . . .
. . . . . a . . a . . . . .
`, SpriteKind.Player)
tiles.placeOnRandomTile(mySprite, sprites.dungeon.collectibleInsignia)
scene.cameraFollowSprite(mySprite)
controller.moveSprite(mySprite, 40, 40)