ld31-space-diggers/src/main.coffee
2014-12-06 17:42:16 +01:00

24 lines
426 B
CoffeeScript

app = playground(
width: 8*20*5,
height: 8*15*5,
scaleToFit: true,
smoothing: false,
create: ->
@loadImages "layers", "active", "selected", "entities"
@currentHoveredTile = new Tile
ready: ->
@game.start()
@setState @game
step: ->
render: ->
@layer.clear "#00f"
@game.render()
layerIndexToName: (index)->
resTypes = (k for own k of @game.resources)
resTypes[index]
)