From 834685c53554f831118a84207708cfd428d09fd9 Mon Sep 17 00:00:00 2001 From: bd Date: Thu, 22 May 2025 23:05:36 -0400 Subject: Use a noise texture to randomly generate obstacles onto map --- scripts/path_generator.gd | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts/path_generator.gd') diff --git a/scripts/path_generator.gd b/scripts/path_generator.gd index 30ffd3c..2b8a3a8 100644 --- a/scripts/path_generator.gd +++ b/scripts/path_generator.gd @@ -42,25 +42,25 @@ func draw_path(): for i in _path: var score : int = _get_tile_score(_path, i) - var atlas_coords : Vector2i = map_config.path_empty_atlas_coords + var atlas_coords : Vector2i = map_config.atlas_coords["PATH_EMPTY"] var rot : TileTransform = TileTransform.ROTATE_0 match score: 2, 8, 10: - atlas_coords = map_config.path_straight_atlas_coords + atlas_coords = map_config.atlas_coords["PATH_STRAIGHT"] rot = TileTransform.ROTATE_90 1, 4, 5: - atlas_coords = map_config.path_straight_atlas_coords + atlas_coords = map_config.atlas_coords["PATH_STRAIGHT"] 3: - atlas_coords = map_config.path_corner_atlas_coords + atlas_coords = map_config.atlas_coords["PATH_CORNER"] rot = TileTransform.ROTATE_270 6: - atlas_coords = map_config.path_corner_atlas_coords + atlas_coords = map_config.atlas_coords["PATH_CORNER"] 12: - atlas_coords = map_config.path_corner_atlas_coords + atlas_coords = map_config.atlas_coords["PATH_CORNER"] rot = TileTransform.ROTATE_90 9: - atlas_coords = map_config.path_corner_atlas_coords + atlas_coords = map_config.atlas_coords["PATH_CORNER"] rot = TileTransform.ROTATE_180 _display_tile(atlas_coords, rot, i) -- cgit v1.2.3