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