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) ->
|
constructor: (options) ->
|
||||||
super options
|
super options
|
||||||
|
|
||||||
@seed = getRandomInt 0, 4
|
@layers = (new Tilelayer(type: restype) for restype, amount in app.game.resources)
|
||||||
|
|
||||||
@layers = [
|
|
||||||
new Tilelayer type: 'grass'
|
|
||||||
new Tilelayer type: 'mud'
|
|
||||||
new Tilelayer type: 'gravel'
|
|
||||||
new Tilelayer type: 'stone'
|
|
||||||
new Tilelayer type: 'gold'
|
|
||||||
]
|
|
||||||
|
|
||||||
@currentLayer = getRandomInt 0, 4
|
@currentLayer = getRandomInt 0, 4
|
||||||
|
|
||||||
|
|
|
@ -13,5 +13,8 @@ app.game =
|
||||||
map: []
|
map: []
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
ore:60
|
stardust: 0
|
||||||
stone: 100
|
bedrock: 0
|
||||||
|
lubinit: 0
|
||||||
|
oxodum: 0
|
||||||
|
notch: 0
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
app.game.hud =
|
app.game.hud =
|
||||||
render: (layer)->
|
render: ->
|
||||||
|
for layer in [""]
|
||||||
app.layer
|
app.layer
|
||||||
.fillStyle "#f00"
|
.fillStyle "#f00"
|
||||||
.fillRect 0, 0, 8, 8
|
.fillRect 0, 0, 8, 8
|
||||||
|
|
Loading…
Reference in a new issue