diff --git a/.makecode/blocks.png b/.makecode/blocks.png new file mode 100644 index 0000000..39966cb Binary files /dev/null and b/.makecode/blocks.png differ diff --git a/.makecode/blocksdiff.png b/.makecode/blocksdiff.png new file mode 100644 index 0000000..be0b61a Binary files /dev/null and b/.makecode/blocksdiff.png differ diff --git a/main.blocks b/main.blocks index 9d1fbb7..a3b7d7d 100644 --- a/main.blocks +++ b/main.blocks @@ -1,4 +1,4 @@ -PlayerProjectileFoodEnemybabyYodabogeyprojectilebulletotherSpritespritebabyYoda0img` +PlayerProjectileFoodEnemybabyYodabogeyprojectilebulletotherSpritespritebabyYoda0img` . . . b b b b b . 7 7 7 . . . . . . b b d d c . 7 7 7 7 7 . . . . b b d d b . 7 7 7 c c c . . . @@ -15,17 +15,17 @@ b b d b b b b b b b b b b b b b . . b b b d d d d d d d b b b . . . . . b b d d d d d b b . . . . . . . . b b b b b b b . . . . -`PlayerSpriteFlag.StayInScreenbabyYodatrue3babyYoda200200spritePlayerotherSpriteEnemyotherSprite-1controller.AControllerButtonEvent.Pressedbullet0img` +`PlayerSpriteFlag.StayInScreenbabyYodatrue3babyYoda200200"G F E C5 C5 C5 G G "500"G F E C5 C5 C5 G G "500"E F C C C - - - "400spritePlayerotherSpriteEnemyotherSprite-1"C5 C - - - - - - "1000spriteProjectileotherSpriteEnemyotherSpriteeffects.firesprite1001music.pewPewcontroller.AControllerButtonEvent.Pressedbullet0img` . . . . . . . . 4 4 5 5 . . . . -`img` +`img` . . . . . . . . 5 5 5 5 . . . . -`babyYoda2000spriteProjectileotherSpriteEnemyotherSpriteeffects.firesprite1001500bogey0img` +`babyYoda2000500bogey0img` . . . . . . . . . . . . . . . . . . . . . . . b b b b b b b . . . . . . . . b b c b c c c c b b @@ -42,4 +42,4 @@ b c c c c c c c b c c c c c b b . . . . . b b c c b c c c c c b . . . . . . b b c b c c c b b b . . . . . . . b b b b b b b . . -`Enemybogey-1000bogey1801200120 \ No newline at end of file +`Enemybogey-1000bogey1801200120 \ No newline at end of file diff --git a/main.ts b/main.ts index c2e9661..5a70e55 100644 --- a/main.ts +++ b/main.ts @@ -2,6 +2,7 @@ sprites.onOverlap(SpriteKind.Projectile, SpriteKind.Enemy, function (sprite, oth otherSprite.destroy() sprite.destroy(effects.fire, 100) info.changeScoreBy(1) + music.pewPew.play() }) controller.A.onEvent(ControllerButtonEvent.Pressed, function () { bullet = sprites.createProjectileFromSprite(img` @@ -14,6 +15,7 @@ controller.A.onEvent(ControllerButtonEvent.Pressed, function () { sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSprite) { otherSprite.destroy() info.changeLifeBy(-1) + music.playMelody("C5 C - - - - - - ", 1000) }) let bogey: Sprite = null let bullet: Sprite = null @@ -39,6 +41,9 @@ b b d b b b b b b b b b b b b b babyYoda.setFlag(SpriteFlag.StayInScreen, true) info.setLife(3) controller.moveSprite(babyYoda, 200, 200) +music.playMelody("G F E C5 C5 C5 G G ", 500) +music.playMelody("G F E C5 C5 C5 G G ", 500) +music.playMelody("E F C C C - - - ", 400) game.onUpdateInterval(500, function () { bogey = sprites.create(img` . . . . . . . . . . . . . . . .