Added ticks for miner
This commit is contained in:
parent
ecfa9d7268
commit
40dade0aa2
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,6 @@
|
|||
class Miner extends BaseEntity
|
||||
render: (x, y)->
|
||||
render: (x, y) ->
|
||||
app.layer.drawRegion app.entities.layers, [8, 0, 8, 8], x, y
|
||||
|
||||
tick: (tile) ->
|
||||
tile.click "left"
|
||||
|
|
|
@ -23,6 +23,9 @@ class Tile extends BaseEntity
|
|||
else
|
||||
@currentLayer += 1
|
||||
|
||||
tick: ->
|
||||
@currentMiner.tick @
|
||||
|
||||
moveIn: ->
|
||||
@isActive = true
|
||||
|
||||
|
|
Loading…
Reference in a new issue