Add bars only on mining tiles
This commit is contained in:
parent
c4ba7c582b
commit
4acbe34b35
1 changed files with 7 additions and 6 deletions
|
@ -57,16 +57,17 @@ class Tile
|
|||
if @currentMiner
|
||||
app.layer.drawRegion app.images.entities, [16, 0, 8, 8], x*8, y*8
|
||||
|
||||
# Draw the status indicator.
|
||||
numPercent = Math.floor((tileLayer.amount*6)/app.game.maxTileAmount)
|
||||
for i in [0..numPercent]
|
||||
color = ["#f00", "#a00", "#f60", "#aa0", "#0a0", "#0a0"][numPercent]
|
||||
color = ["#f00", "#f00", "#f80", "#ff0", "#0f0", "#0f0"][numPercent] if i == numPercent
|
||||
app.layer.setPixel(color, x*8+1+i, y*8+6)
|
||||
|
||||
if @isSelected
|
||||
app.layer.drawImage app.images.selected, x*8, y*8
|
||||
|
||||
if @isActive
|
||||
app.layer.drawImage app.images.active, x*8, y*8
|
||||
|
||||
# Draw the status indicator.
|
||||
numPercent = Math.floor((tileLayer.amount*6)/app.game.maxTileAmount)
|
||||
for i in [0..numPercent]
|
||||
color = ["#f00", "#a00", "#f60", "#aa0", "#0a0", "#0a0"][numPercent]
|
||||
color = ["#f00", "#f00", "#f80", "#ff0", "#0f0", "#0f0"][numPercent] if i == numPercent
|
||||
app.layer.setPixel(color, x*8+1+i, y*8+6)
|
||||
|
||||
|
|
Loading…
Reference in a new issue