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
|
tile.tick() for tile in app.game.map
|
||||||
|
|
||||||
createMiner: ->
|
createMiner: ->
|
||||||
if @currentSelectedTile and !@currentSelectedTile.entity and @checkResource('stardust', 30, true)
|
if @currentSelectedTile and !@currentSelectedTile.entity
|
||||||
@currentSelectedTile.entity = new Miner
|
if @checkResource('stardust', 30, true)
|
||||||
|
@currentSelectedTile.entity = new Miner
|
||||||
|
else
|
||||||
|
@speechbubble.say 'nores'
|
||||||
|
|
||||||
createSilo: ->
|
createSilo: ->
|
||||||
if @currentSelectedTile
|
if @currentSelectedTile
|
||||||
if @checkPosition(@currentSelectedTile)
|
if @checkPosition(@currentSelectedTile)
|
||||||
if @checkResource('stardust', 20, true)
|
if @checkResource('stardust', 20, true)
|
||||||
@currentSelectedTile.entity = new Silo
|
@currentSelectedTile.entity = new Silo
|
||||||
|
else
|
||||||
|
@speechbubble.say 'nores'
|
||||||
else
|
else
|
||||||
@speechbubble.say 'toofar'
|
@speechbubble.say 'toofar'
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ app.game.speechbubble =
|
||||||
switch text
|
switch text
|
||||||
when 'help' then @sprite = [0, 0, 27, 13]
|
when 'help' then @sprite = [0, 0, 27, 13]
|
||||||
when 'toofar' then @sprite = [0, 13, 90, 13]
|
when 'toofar' then @sprite = [0, 13, 90, 13]
|
||||||
|
when 'nores' then @sprite = [0, 26, 90, 13]
|
||||||
|
|
||||||
@visible = true
|
@visible = true
|
||||||
@timeout = window.setTimeout @hide, 1000
|
@timeout = window.setTimeout @hide, 1000
|
||||||
|
|
Loading…
Reference in a new issue