diff --git a/src/entities/tile.coffee b/src/entities/tile.coffee index 3985b03..3b50069 100644 --- a/src/entities/tile.coffee +++ b/src/entities/tile.coffee @@ -15,14 +15,19 @@ class Tile extends BaseEntity @currentLayer = 0 @isActive = false + died: false + click: (button)-> - if button == "left" + if button == "left" and !@died if @layers[@currentLayer].collect() name = app.layerIndexToName(@currentLayer) app.game.resources[name] += 1 else @currentLayer += 1 + if @currentLayer > app.game.resources.length + @died = true + tick: -> @currentMiner.tick @ diff --git a/src/game.coffee b/src/game.coffee index 04e5800..504a191 100644 --- a/src/game.coffee +++ b/src/game.coffee @@ -71,7 +71,11 @@ app.game = resources: stardust: 0 + dirt: 0 bedrock: 0 - lubinit: 0 oxodum: 0 + lubinit: 0 + darkana: 0 + bio: 0 notch: 0 + lava: 0