summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-05-25 13:02:48 -0400
committerbd <bdunahu@operationnull.com>2025-05-25 13:02:48 -0400
commit2e0c1c719db8bd6949a98678d0848c314bdaa0d7 (patch)
tree15b5036c299706c561a28aceaf77c0f5189c13e2 /scripts
parent4e956f8f242eea5c52fb3f6bb6190494e55a7e79 (diff)
Fix bug where different warlocks would share the same circular range
Diffstat (limited to 'scripts')
-rw-r--r--scripts/base_defender.gd4
-rw-r--r--scripts/ui_panel.gd1
2 files changed, 4 insertions, 1 deletions
diff --git a/scripts/base_defender.gd b/scripts/base_defender.gd
index 088f235..a935507 100644
--- a/scripts/base_defender.gd
+++ b/scripts/base_defender.gd
@@ -13,9 +13,13 @@ var _idle_texture : Texture
var _attack_texture : Texture
func set_tower_stats(tower_index : int):
+ var collision_shape = $Tower/CollisionShape2D
+ collision_shape.shape = CircleShape2D.new()
tower_data = game_stats_config.defenders[tower_index].duplicate()
tower_key = tower_data["desc"]
+ reset_tower_range()
+
func reset_tower_range():
$Tower/CollisionShape2D.shape.radius = tower_data["range"]
diff --git a/scripts/ui_panel.gd b/scripts/ui_panel.gd
index d28812b..3786410 100644
--- a/scripts/ui_panel.gd
+++ b/scripts/ui_panel.gd
@@ -12,7 +12,6 @@ func _ready():
$HBoxContainer/Texture.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
$HBoxContainer/VBoxContainer/Label.text = desc
$HBoxContainer/VBoxContainer/Label2.text = str(cost)
- print(get_theme_stylebox("panel").bg_color)
$ColorRect.color = get_theme_stylebox("panel").bg_color
$ColorRect.modulate.a = 0.0