tiles ...
This commit is contained in:
parent
d41ff29aa0
commit
22e61f4e13
3 changed files with 9 additions and 13 deletions
|
@ -2,15 +2,7 @@ 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
|
||||
|
||||
|
|
|
@ -13,5 +13,8 @@ app.game =
|
|||
map: []
|
||||
|
||||
resources:
|
||||
ore:60
|
||||
stone: 100
|
||||
stardust: 0
|
||||
bedrock: 0
|
||||
lubinit: 0
|
||||
oxodum: 0
|
||||
notch: 0
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
app.game.hud =
|
||||
render: (layer)->
|
||||
render: ->
|
||||
for layer in [""]
|
||||
app.layer
|
||||
.fillStyle "#f00"
|
||||
.fillRect 0, 0, 8, 8
|
||||
|
|
Loading…
Reference in a new issue