Skip to content

Commit

Permalink
stone falling
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeChamp-SS committed Jan 30, 2021
1 parent 70a96a9 commit 5db64ed
Show file tree
Hide file tree
Showing 7 changed files with 191 additions and 68 deletions.
Binary file modified .github/makecode/blocks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .github/makecode/blocksdiff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion images.g.jres

Large diffs are not rendered by default.

238 changes: 180 additions & 58 deletions images.g.ts

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions main.blocks

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,5 @@ def on_update_interval2():
stone = sprites.create_projectile_from_side(assets.image("""
image14
"""), 0, 55)
stone.x = hacker.x
stone.x = hacker.x + 5
game.on_update_interval(5000, on_update_interval2)
10 changes: 5 additions & 5 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ controller.up.onEvent(ControllerButtonEvent.Pressed, function () {
cnt += 2
}
})
scene.onOverlapTile(SpriteKind.Projectile, sprites.castle.tilePath2, function (sprite, location) {
stone.destroy(effects.disintegrate, 500)
})
controller.left.onEvent(ControllerButtonEvent.Pressed, function () {
hacker.setImage(assets.image`Temporary asset3`)
})
controller.right.onEvent(ControllerButtonEvent.Pressed, function () {
hacker.setImage(assets.image`Temporary asset2`)
})
scene.onHitWall(SpriteKind.Projectile, function (sprite, location) {
stone.destroy(effects.disintegrate, 200)
})
let projectile: Sprite = null
let stone: Sprite = null
let cnt = 0
Expand Down Expand Up @@ -164,6 +164,6 @@ game.onUpdateInterval(5000, function () {
projectile.y = 50
})
game.onUpdateInterval(5000, function () {
stone = sprites.createProjectileFromSide(assets.image`stone_img`, 0, 81)
stone.x = hacker.x
stone = sprites.createProjectileFromSide(assets.image`stone_img`, 0, 55)
stone.x = hacker.x + 5
})

1 comment on commit 5db64ed

@CodeChamp-SS
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.