Adjust colors
This commit is contained in:
parent
3daf7f0edf
commit
8a5fb61903
1 changed files with 4 additions and 3 deletions
|
@ -37,8 +37,9 @@ class Tile extends BaseEntity
|
||||||
app.layer.drawImage app.images.active, x*8, y*8
|
app.layer.drawImage app.images.active, x*8, y*8
|
||||||
|
|
||||||
# Draw the status indicator.
|
# Draw the status indicator.
|
||||||
numPercent = Math.ceil((tileLayer.amount*6)/app.game.maxTileAmount)
|
numPercent = Math.floor((tileLayer.amount*6)/app.game.maxTileAmount)
|
||||||
for i in [0..numPercent]
|
for i in [0..numPercent]
|
||||||
color = ["#333", "#a00", "#f60", "#aa0", "#0a0", "#0a0"][numPercent]
|
color = ["#f00", "#a00", "#f60", "#aa0", "#0a0", "#0a0"][numPercent]
|
||||||
color = ["#000", "#f00", "#f80", "#ff0", "#0f0", "#0f0"][numPercent] if i == numPercent
|
color = ["#f00", "#f00", "#f80", "#ff0", "#0f0", "#0f0"][numPercent] if i == numPercent
|
||||||
app.layer.setPixel(color, x*8+1+i, y*8+6)
|
app.layer.setPixel(color, x*8+1+i, y*8+6)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue