From 2ebd971b8ca22db172a3d0fec1c319e5414de5b7 Mon Sep 17 00:00:00 2001 From: Nicholas Hayashi Date: Sat, 20 Feb 2021 17:51:08 -0500 Subject: [PATCH] fix more serialization bugs --- main.lua | 2 +- src/game.lua | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/main.lua b/main.lua index 4f987f6..77950b8 100644 --- a/main.lua +++ b/main.lua @@ -169,7 +169,7 @@ function main_scene(do_backdrop) local node = am.translate(hex_to_pixel(vec2(i, j), vec2(HEX_SIZE))) ^ am.circle(vec2(0), HEX_SIZE, vec4(0), 6) - node"circle":action(am.tween(1, { color = color })) + node"circle":action(am.tween(0.6, { color = color })) hex_backdrop:append(node) end diff --git a/src/game.lua b/src/game.lua index d8bdec6..693a254 100644 --- a/src/game.lua +++ b/src/game.lua @@ -140,6 +140,10 @@ local function game_deserialize(json_string) end end + -- after we have re-constituted all of the towers and modified the map's elevations accordingly, + -- we should re-calc the flow-field + apply_flow_field(new_state.map, generate_flow_field(new_state.map, HEX_GRID_CENTER), new_state.world) + for i,m in pairs(new_state.mobs) do if m then new_state.mobs[i] = mob_deserialize(m)