Added ticks for miner

This commit is contained in:
Ruben Müller 2014-12-06 19:49:57 +01:00
parent ecfa9d7268
commit 40dade0aa2
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,6 @@
class Miner extends BaseEntity class Miner extends BaseEntity
render: (x, y) -> render: (x, y) ->
app.layer.drawRegion app.entities.layers, [8, 0, 8, 8], x, y app.layer.drawRegion app.entities.layers, [8, 0, 8, 8], x, y
tick: (tile) ->
tile.click "left"

View file

@ -23,6 +23,9 @@ class Tile extends BaseEntity
else else
@currentLayer += 1 @currentLayer += 1
tick: ->
@currentMiner.tick @
moveIn: -> moveIn: ->
@isActive = true @isActive = true