Working on miners

This commit is contained in:
Ruben Müller 2014-12-06 17:17:33 +01:00
parent 05abf401a6
commit 81548836a1
3 changed files with 7 additions and 1 deletions

View file

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

View file

@ -3,6 +3,9 @@ app.game =
for i in [0..20*15-1] for i in [0..20*15-1]
@map[i] = new Tile @map[i] = new Tile
@miners = []
@miners.push = new Miner
render: -> render: ->
app.layer.save().scale(5, 5) app.layer.save().scale(5, 5)

View file

@ -5,7 +5,7 @@ app = playground({
smoothing: false, smoothing: false,
create: -> create: ->
@loadImages "layers", "active", "selected" @loadImages "layers", "active", "selected", "entities"
@currentHoveredTile = new Tile @currentHoveredTile = new Tile
ready: -> ready: ->