Skip to content

Commit

Permalink
character improvements and basic animations
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeChamp-SS committed Jan 30, 2021
1 parent 4524557 commit 2c6c418
Show file tree
Hide file tree
Showing 6 changed files with 716 additions and 250 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.
28 changes: 27 additions & 1 deletion images.g.jres

Large diffs are not rendered by default.

516 changes: 433 additions & 83 deletions images.g.ts

Large diffs are not rendered by default.

205 changes: 123 additions & 82 deletions main.blocks

Large diffs are not rendered by default.

217 changes: 133 additions & 84 deletions main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
controller.anyButton.onEvent(ControllerButtonEvent.Pressed, function () {
hacker.vy = -60
})
let projectile: Sprite = null
let hacker: Sprite = null
scene.setBackgroundImage(img`
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
Expand Down Expand Up @@ -124,89 +125,137 @@ scene.setBackgroundImage(img`
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
`)
let hacker = sprites.create(img`
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
.................................222222333......................................
.................................222222333......................................
.................................222222333......................................
.................................333333333222...................................
.................................333333333222...................................
.................................333333333222...................................
.................................fffffffff......................................
.................................fdddddddd......................................
.................................fddddfffd......................................
.................................dddddfddd......................................
...............................dddddddddfd......................................
...............................ddddddddddddd....................................
.................................ddddddddddd....................................
.................................ddddddddd......................................
.................................dddddddddd.....................................
.................................ddddddddd......................................
....................................ddd.........................................
....................................ddd.........................................
....................................ddd.......................ddd...............
..............................555555555555444.................dddd..............
...........................ddd555555555555444................ddddd..............
.........................ddddd555555555555444dd..............dddddd.............
........................dddddd555555555444444ddddddd.......dddddddd.............
......................ddddddd.555555555444555dddddddd....dddddddddd.............
....................ddddddddd.555555544444555ddddddddd.ddddddd..................
...................dddddddddd.555555544455555ddddddddddddddddd..................
...................ddddddddd..555554444455555.ddddddddddddddd...................
..................ddddddddd...555554445555555...ddddddddddd.....................
..................ddddd.......555444445555555....ddddddddd......................
..................ddddd.......555444555555555.....ddddddd.......................
...................dddd.......444444555555555.......dddd........................
...................ddddd......444555555555555...................................
...................dddddd.....444555555555555...................................
....................ddddd.....888888888888888...................................
.....................dddd.....88888888888888888.................................
......................dddd....888888888888888888888.............................
......................dddd....8888888888888888888888............................
.......................ddddddd8888888888888888888888............................
........................dddddd888888888888888888888888..........................
........................dddddd88888888.....88888888888..........................
.......................dddddd.88888888......8888888888..........................
........................dddd..88888888.........8888888..........................
.........................dd...8888888..........8888888..........................
..............................8888888..........8888888..........................
.............................8888888...........8888888..........................
.............................8888888...........8888888..........................
.............................8888888...........8888888..........................
............................8888888...........88888888..........................
............................8888888...........888888............................
............................8888888...........888888............................
............................888888...........8888888............................
...........................8888888...........888888.............................
...........................888888...........fffffff.............................
..........................8888888...........fffffffffff.........................
.........................8888888............ffffffffffff........................
........................fffffff8............fffffffffffff.......................
........................fffffffffff.........fffffffffffff.......................
........................fffffffffffff...........................................
........................fffffffffffff...........................................
........................ffffffffffffff..........................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
`, SpriteKind.Player)
hacker = sprites.create(assets.image`Temporary asset`, SpriteKind.Player)
animation.runImageAnimation(
hacker,
[img`
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
........................22222333............................
........................33333333............................
........................3333333322..........................
........................ffffffff............................
........................ffdddddd............................
........................ddddddfd............................
........................ddddddddd...........................
........................dddddfff............................
...........................ddd..............................
...........................ddd..............................
........................555555555.......dd..................
......................dd555555555d......ddd.................
.....................ddd555555555dd....dddd.................
....................ddd.555555555dddd.ddd...................
....................dd..555555555.dddddd....................
...................ddd..555555555...ddd.....................
...................ddd..555555555...........................
...................ddd..555555555...........................
....................ddd.666666666...........................
....................ddddd66..66666..........................
......................ddd66...66666.........................
.......................dd66....66666........................
................fff6...666......66666.......................
................fff66.6666.......6666.......................
................fff666666.......6666........................
................fff666666......6666.........................
................ff..6666.......6666.........................
................ff.............ffff.........................
...............................ffffff.......................
...............................ffffff.......................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
`,img`
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
.........................22222333...........................
.........................33333333...........................
.........................3333333322.........................
.........................ffffffff...........................
.........................ffdddddd...........................
.........................ddddddfd...........................
.........................ddddddddd..........................
.........................dddddfff...........................
............................ddd.............................
............................ddd.............................
.........................555555555.......dd.................
.......................dd555555555d......ddd................
......................ddd555555555dd....dddd................
.....................ddd.555555555dddd.ddd..................
.....................dd..555555555.dddddd...................
....................ddd..555555555...ddd....................
....................ddd..555555555..........................
....................ddd..555555555..........................
.....................ddd.666666666..........................
.....................ddddd666666666666......................
.......................ddd666..666666666....................
........................dd666....6666666....................
........................666666......6666....................
........................666666.....6666.....................
........................66666.....66666.....................
.......................666666..fff6666......................
......................66666....fff666.......................
......................6666.....fff66........................
......................ffff.....fff6.........................
......................ffffff...ff...........................
......................ffffff...ff...........................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
............................................................
`],
500,
true
)
hacker.setPosition(40, 80)
hacker.ay = 80
game.onUpdateInterval(3000, function () {
projectile = sprites.createProjectileFromSide(img`
...........fffffff...ccfff..........
Expand Down

1 comment on commit 2c6c418

@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.