ld31-space-diggers/src/game.coffee

23 lines
322 B
CoffeeScript
Raw Normal View History

2014-12-06 12:37:57 +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: ->
2014-12-06 12:37:57 +01:00
for tile, i in @map
tile.render(i-(Math.floor(i/20)*20), Math.floor(i/20))
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 12:37:57 +01:00
ore:50
2014-12-06 08:37:36 +01:00
stone: 100