Merge branch 'master' of https://github.com/arg-games/ld31
Conflicts: src/app.coffee
This commit is contained in:
commit
68838fa3c9
3 changed files with 7 additions and 2 deletions
BIN
public/images/titlescreen.png
Normal file
BIN
public/images/titlescreen.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.6 KiB |
|
@ -5,7 +5,7 @@ app = playground(
|
|||
smoothing: false,
|
||||
|
||||
create: ->
|
||||
@loadImages "layers", "active", "progress", "selected", "entities", "hud", "actions", "speechbubbles", "deadtiles", "layerdetails", "entitydetails", "buildinfo", "cursor", "info"
|
||||
@loadImages "layers", "active", "progress", "selected", "entities", "hud", "actions", "speechbubbles", "deadtiles", "layerdetails", "entitydetails", "buildinfo", "cursor", "info", "end"
|
||||
@currentHoveredTile = new Tile
|
||||
|
||||
ready: ->
|
||||
|
|
|
@ -41,6 +41,10 @@ app.game =
|
|||
app.game.speechbubble.setMouse()
|
||||
|
||||
render: ->
|
||||
if @gameEndCheck()
|
||||
app.layer.drawImage app.images.end, 0, 0, 20*8, 15*8
|
||||
return
|
||||
|
||||
for tile, i in @map
|
||||
y = Math.floor(i/20)
|
||||
x = i-(y*20)
|
||||
|
@ -207,6 +211,7 @@ app.game =
|
|||
solarpanelCount: ->
|
||||
energy = 0
|
||||
for tile in app.game.map
|
||||
# FIXME: Thats not a sane solution hahahah :D
|
||||
energy += 1 if tile.entity and tile.entity.energyProvided > 10
|
||||
energy
|
||||
|
||||
|
|
Loading…
Reference in a new issue