tiles ...

This commit is contained in:
Aaron Mueller 2014-12-06 13:14:15 +01:00
parent d41ff29aa0
commit 22e61f4e13
3 changed files with 9 additions and 13 deletions

View file

@ -1,16 +1,8 @@
class Tile extends BaseEntity
class Tile extends BaseEntity
constructor: (options) ->
super options
@seed = getRandomInt 0, 4
@layers = [
new Tilelayer type: 'grass'
new Tilelayer type: 'mud'
new Tilelayer type: 'gravel'
new Tilelayer type: 'stone'
new Tilelayer type: 'gold'
]
@layers = (new Tilelayer(type: restype) for restype, amount in app.game.resources)
@currentLayer = getRandomInt 0, 4

View file

@ -13,5 +13,8 @@ app.game =
map: []
resources:
ore:60
stone: 100
stardust: 0
bedrock: 0
lubinit: 0
oxodum: 0
notch: 0

View file

@ -1,5 +1,6 @@
app.game.hud =
render: (layer)->
render: ->
for layer in [""]
app.layer
.fillStyle "#f00"
.fillRect 0, 0, 8, 8