diff options
author | David Luevano Alvarado <david@luevano.xyz> | 2022-06-04 10:27:35 -0600 |
---|---|---|
committer | David Luevano Alvarado <david@luevano.xyz> | 2022-06-04 10:27:35 -0600 |
commit | 9a2bcf02c2623c8f3e8f5e74e70b3c0333790484 (patch) | |
tree | 42c7398d15c6b888b7d9d00ecb4e8fc5107501c7 /src/tools/world_generator/scripts | |
parent | e6beb7d4d3450c68ca5ebfae040f42dd82db1b31 (diff) |
refactor nodes to work with native scene changer, add functioning main menu
Diffstat (limited to 'src/tools/world_generator/scripts')
-rw-r--r-- | src/tools/world_generator/scripts/walker_head.gd | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/world_generator/scripts/walker_head.gd b/src/tools/world_generator/scripts/walker_head.gd index 3bf7e3a..dc71db1 100644 --- a/src/tools/world_generator/scripts/walker_head.gd +++ b/src/tools/world_generator/scripts/walker_head.gd @@ -2,8 +2,8 @@ extends Node2D export(NodePath) var TILEMAP_NP: NodePath export(PackedScene) var WALKER_UNIT_NP: PackedScene -export(int, 5, 100, 1) var starting_unit_count: int = 5 -export(int, 5, 10, 1) var initial_safe_zone_size: int = 5 +export(int, 5, 100, 1) var STARTING_UNIT_COUNT: int = 5 +export(int, 3, 10, 1) var INITIAL_SAFE_ZONE_SIZE: int = 3 onready var tilemap: TileMap = get_node(TILEMAP_NP) @@ -24,14 +24,14 @@ func _ready() -> void: func _place_safe_zone() -> void: - for i in initial_safe_zone_size: - for j in initial_safe_zone_size: + var size: int = INITIAL_SAFE_ZONE_SIZE + for i in range(-size, size): + for j in range(-size, size): tilemap.set_cell(i, j, Global.WORLD_TILE_PATH) - tilemap.set_cell(-i, -j, Global.WORLD_TILE_PATH) func _spawn_walker_units() -> void: - for i in starting_unit_count: + for i in STARTING_UNIT_COUNT: _spawn_walker_unit(Vector2.ZERO) |