Working on miners
This commit is contained in:
parent
05abf401a6
commit
81548836a1
3 changed files with 7 additions and 1 deletions
3
src/entities/miner.coffee
Normal file
3
src/entities/miner.coffee
Normal file
|
@ -0,0 +1,3 @@
|
|||
class Miner extends BaseEntity
|
||||
render: (x, y)->
|
||||
app.layer.drawRegion app.entities.layers, [8, 0, 8, 8], x, y
|
|
@ -3,6 +3,9 @@ app.game =
|
|||
for i in [0..20*15-1]
|
||||
@map[i] = new Tile
|
||||
|
||||
@miners = []
|
||||
@miners.push = new Miner
|
||||
|
||||
render: ->
|
||||
app.layer.save().scale(5, 5)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ app = playground({
|
|||
smoothing: false,
|
||||
|
||||
create: ->
|
||||
@loadImages "layers", "active", "selected"
|
||||
@loadImages "layers", "active", "selected", "entities"
|
||||
@currentHoveredTile = new Tile
|
||||
|
||||
ready: ->
|
||||
|
|
Loading…
Reference in a new issue