Speechbubble says more

This commit is contained in:
Ruben Müller 2014-12-07 17:31:30 +01:00
parent 9dcef3b43e
commit 9a6ef0c994
4 changed files with 8 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

View file

@ -75,14 +75,19 @@ app.game =
tile.tick() for tile in app.game.map
createMiner: ->
if @currentSelectedTile and !@currentSelectedTile.entity and @checkResource('stardust', 30, true)
@currentSelectedTile.entity = new Miner
if @currentSelectedTile and !@currentSelectedTile.entity
if @checkResource('stardust', 30, true)
@currentSelectedTile.entity = new Miner
else
@speechbubble.say 'nores'
createSilo: ->
if @currentSelectedTile
if @checkPosition(@currentSelectedTile)
if @checkResource('stardust', 20, true)
@currentSelectedTile.entity = new Silo
else
@speechbubble.say 'nores'
else
@speechbubble.say 'toofar'

View file

@ -8,6 +8,7 @@ app.game.speechbubble =
switch text
when 'help' then @sprite = [0, 0, 27, 13]
when 'toofar' then @sprite = [0, 13, 90, 13]
when 'nores' then @sprite = [0, 26, 90, 13]
@visible = true
@timeout = window.setTimeout @hide, 1000