From 20cee47992cf1a8cbbca4939a149f5722bdf023e Mon Sep 17 00:00:00 2001 From: Kaan Soral Date: Mon, 23 Jul 2018 09:24:08 +0300 Subject: [PATCH] Create draw_map_lines.js --- examples/draw_map_lines.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 examples/draw_map_lines.js diff --git a/examples/draw_map_lines.js b/examples/draw_map_lines.js new file mode 100644 index 0000000..6ab551e --- /dev/null +++ b/examples/draw_map_lines.js @@ -0,0 +1,15 @@ +function draw_lines() +{ + parent.GEO.x_lines.forEach(function(line){ + draw_line(line[0],line[1],line[0],line[2],2); + }); + parent.GEO.y_lines.forEach(function(line){ + draw_line(line[1],line[0],line[2],line[0],2); + }); +} +game.on("new_map",function(data){ + if(!data.redraw) return; + draw_lines(); +}) + +draw_lines();