-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.ts
60 lines (60 loc) · 2.13 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
sprites.onOverlap(SpriteKind.Player, SpriteKind.Food, function (sprite, otherSprite) {
info.changeScoreBy(1)
hotdog.setPosition(randint(0, 160), randint(0, 120))
info.startCountdown(10)
})
let hotdog: Sprite = null
scene.setBackgroundColor(10)
let mySprite = sprites.create(img`
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . 3 3 3 3 . . . . . .
. . 3 3 3 3 3 3 3 3 3 3 3 3 . .
. . 3 3 3 3 f f f f 3 3 3 3 . .
. . 3 3 3 3 f f f f 3 3 3 3 . .
. . 3 3 3 3 f f f f 3 3 3 3 . .
. . 3 3 3 3 3 3 3 3 3 3 3 3 . .
. . . 3 3 3 . . . . 3 3 3 . . .
. . . 3 3 3 . . . . 3 3 3 . . .
. . . 3 3 3 . . . . 3 3 3 . . .
. . . . . . 3 3 3 3 . . . . . .
. . . . . . 3 3 3 3 . . . . . .
. . . . . . 3 3 3 3 . . . . . .
. . . . . . . . . . . . . . . .
`, SpriteKind.Player)
controller.moveSprite(mySprite)
hotdog = sprites.create(img`
..............bbbbbbb...........
...........bb66663333baa........
.........bb3367776333663aa......
........b33333888333389633aa....
.......b3333333333333389633aa...
......b34443333333333338633bae..
.....b3455433333333334443333ae..
....b33322333dddd3333455233daee.
...b3d333333dd3bbbb33322333dabe.
..b3d333333d3bb33bb33333333da4e.
..bd33333333b33aab3333333223a4ee
.b3d3663333b33aab33366332442b4ee
.bd3b983333a3aa3333387633ee3b4ee
.bd6983333baaa333333387633bb4bee
b3d6833333bba333333333863ba44ebe
bdd3333333bb3333333333333a44bebe
add666633333322333366333ba44bbbe
ad67776333332442336983d3a444b4e.
add888b333333ee3369833d3a44b44e.
add333333333333336833d3a444b4e..
a3dd3333344433333dddd3a444b44e..
ab33ddd325543333dd33aa444b44e...
.eabb3dd32233333baaa4444b44e....
.ebabb3d333d33baa444443b44e.....
..ebaab3ddd3aaa4444433b44e......
..eebbaab33a44444333b444e.......
...eeebbaab444b333b4444e........
....ebeeebbbbbbbb4444ee.........
.....eebbbb44444444ee...........
.......eeebbb444eee.............
..........eeeeee................
................................
`, SpriteKind.Food)