need to change the diaper .... :D

This commit is contained in:
Aaron Mueller 2014-12-06 13:27:44 +01:00
parent 22e61f4e13
commit c35af25d1c
1 changed files with 6 additions and 4 deletions

View File

@ -2,13 +2,15 @@ class Tile extends BaseEntity
constructor: (options) ->
super options
@layers = (new Tilelayer(type: restype) for restype, amount in app.game.resources)
#@layers = (new Tilelayer(type: restype) for restype, amount in app.game.resources)
for restype, amount in app.game.resources
console.log(restype, amount)
@currentLayer = getRandomInt 0, 4
tick: (delta) ->
# TODO: digging deeper?
# TODO: digging deeper?
render: (x, y)->
tile = @layers[@currentLayer]
tile.render(app.layer, x, y)
#tile = @layers[@currentLayer]
#tile.render(app.layer, x, y)