summaryrefslogtreecommitdiff
path: root/scripts/path_generator.gd
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-05-22 23:05:36 -0400
committerbd <bdunahu@operationnull.com>2025-05-22 23:05:36 -0400
commit834685c53554f831118a84207708cfd428d09fd9 (patch)
tree6bd8bd85c28d055c5947d554f9a99bc57aeaf1ae /scripts/path_generator.gd
parent69013e2a35969fbb52cd0c3db07787698eb8c5a3 (diff)
Use a noise texture to randomly generate obstacles onto map
Diffstat (limited to 'scripts/path_generator.gd')
-rw-r--r--scripts/path_generator.gd14
1 files changed, 7 insertions, 7 deletions
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)