Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
50322fedf5
5 changed files with 18 additions and 14 deletions
10
notes.org
10
notes.org
|
@ -1,10 +1,4 @@
|
||||||
Title: Entire game on one screen
|
Title: Entire game on one screen
|
||||||
|
|
||||||
* TODO INTRO
|
* TODO
|
||||||
** intro grafiken einbauen
|
** release
|
||||||
|
|
||||||
* TODO HUD
|
|
||||||
** i key
|
|
||||||
|
|
||||||
* TODO OUTRO
|
|
||||||
** win screen
|
|
BIN
public/images/info.png
Normal file
BIN
public/images/info.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1 KiB |
|
@ -5,7 +5,7 @@ app = playground(
|
||||||
smoothing: false,
|
smoothing: false,
|
||||||
|
|
||||||
create: ->
|
create: ->
|
||||||
@loadImages "layers", "active", "progress", "selected", "entities", "hud", "actions", "speechbubbles", "deadtiles", "layerdetails", "entitydetails", "buildinfo", "cursor"
|
@loadImages "layers", "active", "progress", "selected", "entities", "hud", "actions", "speechbubbles", "deadtiles", "layerdetails", "entitydetails", "buildinfo", "cursor", "info", "end"
|
||||||
@currentHoveredTile = new Tile
|
@currentHoveredTile = new Tile
|
||||||
|
|
||||||
ready: ->
|
ready: ->
|
||||||
|
|
|
@ -41,6 +41,10 @@ app.game =
|
||||||
app.game.speechbubble.setMouse()
|
app.game.speechbubble.setMouse()
|
||||||
|
|
||||||
render: ->
|
render: ->
|
||||||
|
if @gameEndCheck()
|
||||||
|
app.layer.drawImage app.images.end, 0, 0, 20*8, 15*8
|
||||||
|
return
|
||||||
|
|
||||||
for tile, i in @map
|
for tile, i in @map
|
||||||
y = Math.floor(i/20)
|
y = Math.floor(i/20)
|
||||||
x = i-(y*20)
|
x = i-(y*20)
|
||||||
|
@ -57,6 +61,9 @@ app.game =
|
||||||
if @isMouseInView event.x/8, event.y/8
|
if @isMouseInView event.x/8, event.y/8
|
||||||
switch event.button
|
switch event.button
|
||||||
when 'left'
|
when 'left'
|
||||||
|
if event.x > 143 and event.x < 151 and event.y > 95 and event.y < 106
|
||||||
|
app.game.hud.showBuildInfo()
|
||||||
|
else
|
||||||
tile.click(event.button)
|
tile.click(event.button)
|
||||||
|
|
||||||
@currentSelectedTile.deselect() if @currentSelectedTile
|
@currentSelectedTile.deselect() if @currentSelectedTile
|
||||||
|
@ -204,6 +211,7 @@ app.game =
|
||||||
solarpanelCount: ->
|
solarpanelCount: ->
|
||||||
energy = 0
|
energy = 0
|
||||||
for tile in app.game.map
|
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 += 1 if tile.entity and tile.entity.energyProvided > 10
|
||||||
energy
|
energy
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,8 @@ app.game.hud =
|
||||||
panelusage = 'resources'
|
panelusage = 'resources'
|
||||||
app.layer.drawImage app.images.hud, 0, 11*8
|
app.layer.drawImage app.images.hud, 0, 11*8
|
||||||
|
|
||||||
|
app.layer.drawImage app.images.info, 143, 95
|
||||||
|
|
||||||
# cursor
|
# cursor
|
||||||
# app.layer.drawImage app.images.cursor, app.game.mouseX, app.game.mouseY
|
# app.layer.drawImage app.images.cursor, app.game.mouseX, app.game.mouseY
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue