From 8a5fb61903f64d4e213967409f6da9bca4451870 Mon Sep 17 00:00:00 2001 From: Aaron Mueller Date: Sat, 6 Dec 2014 18:12:38 +0100 Subject: [PATCH] Adjust colors --- src/entities/tile.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/entities/tile.coffee b/src/entities/tile.coffee index 0557223..b427c0c 100644 --- a/src/entities/tile.coffee +++ b/src/entities/tile.coffee @@ -37,8 +37,9 @@ class Tile extends BaseEntity app.layer.drawImage app.images.active, x*8, y*8 # 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] - color = ["#333", "#a00", "#f60", "#aa0", "#0a0", "#0a0"][numPercent] - color = ["#000", "#f00", "#f80", "#ff0", "#0f0", "#0f0"][numPercent] if i == 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) +