Skip to content
Browse files

Level 5

  • Loading branch information...
1 parent 7bbca68 commit 6a39655852a3f312edd134df20ce07c9dc0a14aa @lessandro committed
Showing with 32 additions and 8 deletions.
  1. BIN img/images.png
  2. BIN img/images.xcf
  3. +4 −1 src/canvas.ls
  4. +1 −1 src/game.ls
  5. +25 −4 src/level.ls
  6. +1 −1 src/player.ls
  7. +1 −1 src/tile.ls
View
BIN img/images.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN img/images.xcf
Binary file not shown.
View
5 src/canvas.ls
@@ -18,7 +18,7 @@ class Canvas
\player1l : new Sprite(3, 0, 14, 16)
\bulletr : new Sprite(0, 1, 7, 3)
\bulletl : new Sprite(1, 1, 7, 3)
- \* : new Sprite(0, 2)
+ \T : new Sprite(0, 2)
\P : new Sprite(1, 2)
\R : new Sprite(2, 2)
\D : new Sprite(3, 2)
@@ -30,6 +30,9 @@ class Canvas
\W : new Sprite(5, 3)
\- : new Sprite(6, 3)
\U : new Sprite(0, 4)
+ \| : new Sprite(1, 4)
+ \% : new Sprite(2, 4)
+ \* : new Sprite(3, 4)
\J : new Sprite(3, 1)
\Z : new Sprite(2, 1)
View
2 src/game.ls
@@ -3,7 +3,7 @@ class Game
@input = new Input()
@canvas = new Canvas()
@restart = true
- @current-level = 3
+ @current-level = 0
run: ->
console.log \running
View
29 src/level.ls
@@ -8,7 +8,7 @@ class Level
tiles: [
'BBBBBBBBBBBBBBBBBBBG'
'BP RBG'
- 'B D D * D BG'
+ 'B D D T D BG'
'B B B B B BG'
'BD D D D DBG'
'BB B B B BBG'
@@ -29,7 +29,7 @@ class Level
'B BBBBB BB BBBBBBBBBBBBBBBBB '
'B- - - BB BB B '
'B --- B BB BBBBBBBBB B '
- 'B -- B *B ----- B BB PB B B '
+ 'B -- B TB ----- B BB PB B B '
'B B - B B B B B B BB '
'B --- RB B DDDDD B B BB B BB B '
'B BD -B B BP PB BPB '
@@ -50,7 +50,7 @@ class Level
'G+ F F FF F F F FF F F F FF R W'
'GBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBFF FFGG W'
'GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGFF FFGG W'
- 'GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGFFJ*FFGG W'
+ 'GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGFFJTFFGG W'
'GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGFFFFFFFFF'
]
@@ -72,7 +72,7 @@ class Level
tiles: [
'GUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'
- 'GU *U D D D D D D UR D D D DU D D D D D D D DRU'
+ 'GU TU D D D D D D UR D D D DU D D D D D D D DRU'
'GU UUUUUU U UUU UUUUUUU U WUUUUUUU DWUUW U DU UUUUUUUUUUUUU =U'
'GUU U UUU UUUU U UUUUU DU UU D UUU UUU UDU DU D UUUU'
'GU+U UUU U D U UD UUUUUW U JUDU DUUUUUD U UF U U'
@@ -85,6 +85,27 @@ class Level
enemies: [
]
+ },
+ {
+ player:
+ x: 2
+ y: 8
+
+ tiles: [
+ 'G *%%% * * * * * * * * *%%%%% * * * GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG GGGG'
+ 'G %%%%% * * * * * * * %%%%% * * GGGGG D D D P|P P|P R RGGG'
+ 'G %%%%% * * * * %%%%% T R RGGG %%% G G GG'
+ 'G %%%%% %%%%% G GGG G %%% = G'
+ 'G* P|P P J P|P GG GGGG %%% G R G'
+ 'G | G G P G | G G GG D FGGGG | G'
+ 'G | GGG Z G G G | GGD G GGGGD | G G G'
+ 'G | GGG GGGGG G GGG G G GG F | G G G G'
+ 'G+ | GGGGG GGGGG GGG G RGGWWWGGF F | GGG'
+ 'GGGGGGGGGGGGGGGGGGGGGGGGGWWWWWWWWWWWWWWWWWGGGGGGGGGGGGGFFFFFFFFFFGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG'
+ ]
+
+ enemies: [
+ ]
}
]
View
2 src/player.ls
@@ -120,7 +120,7 @@ class Player extends Entity
touch-tiles: ->
for tile in @touching-tiles!
- if tile.tile == \*
+ if tile.tile == \T
@has-trophy = true
if tile.tile == \=
View
2 src/tile.ls
@@ -3,6 +3,6 @@ class Tile
@is-solid = (in <[ B U G + - ]>)
- @is-pickable = (in <[ * P D R J Z ]>)
+ @is-pickable = (in <[ T P D R J Z ]>)
@is-lethal = (in <[ W F ]>)

0 comments on commit 6a39655

Please sign in to comment.
Something went wrong with that request. Please try again.