From 777116d0695fc1355f089fbf882bf9b6f753304d Mon Sep 17 00:00:00 2001 From: Nicholas Hayashi Date: Mon, 1 Feb 2021 04:21:07 -0500 Subject: [PATCH] thing --- src/tower.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tower.lua b/src/tower.lua index 2bc4100..4226915 100644 --- a/src/tower.lua +++ b/src/tower.lua @@ -206,9 +206,12 @@ function update_tower_lighthouse(tower, tower_index) for _,h in pairs(area) do local node = HEX_MAP[h.x][h.y].node"circle" local initial_color = node.color + + local d = math.distance(h, tower.hex) + local target_color = COLORS.SUNRAY{ a = 1/(d/tower.range) } node:late_action(am.series{ - am.tween(node, 0.1, { color = COLORS.SUNRAY }), - am.tween(node, 0.1, { color = initial_color }) + am.tween(node, 0.3, { color = target_color }), + am.tween(node, 0.3, { color = initial_color }) }) end end