Speechbubble says more
This commit is contained in:
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 |
BIN
public/images/speechbubbles.psd
Normal file
BIN
public/images/speechbubbles.psd
Normal file
Binary file not shown.
|
@ -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'
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue