ld31-space-diggers/src/game.coffee

24 lines
277 B
CoffeeScript
Raw Normal View History

2014-12-06 10:34:53 +01:00
app.game = {
2014-12-06 08:37:36 +01:00
start: ->
2014-12-06 10:34:53 +01:00
for i in [0..20*15]
@map[i] = new Tile
2014-12-06 08:37:36 +01:00
2014-12-06 09:24:36 +01:00
hud: ->
2014-12-06 10:34:53 +01:00
app.layer
2014-12-06 09:24:36 +01:00
.fillStyle "#00f"
.fillRect 0, 0, 200, 50
2014-12-06 10:34:53 +01:00
render: ->
for i in @map
i.render()
2014-12-06 09:24:36 +01:00
2014-12-06 08:37:36 +01:00
step: ->
2014-12-06 10:34:53 +01:00
@hud
map: []
2014-12-06 08:37:36 +01:00
resources:
2014-12-06 09:24:36 +01:00
ore: 50
2014-12-06 08:37:36 +01:00
stone: 100
}