Conflicts:
	src/app.coffee
This commit is contained in:
Ruben Müller 2014-12-07 18:54:11 +01:00
commit 68838fa3c9
3 changed files with 7 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View file

@ -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: ->

View file

@ -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