Prevent overlapping buildings

This commit is contained in:
2025-04-30 11:21:34 +02:00
parent 7d79d3f60f
commit fee9cb99cf
8 changed files with 82 additions and 11 deletions

View File

@ -14,6 +14,19 @@ func _input(event):
for i in list_of_entities:
for j in LIST_OF_ENTITIES:
if i.get_parent().name.contains(j):
match j:
"ArcherTower":
get_parent().get_node("SidePanel").Update_Coins(60)
"WizardTower":
get_parent().get_node("SidePanel").Update_Coins(30)
"MortarTower":
get_parent().get_node("SidePanel").Update_Coins(80)
"Mine":
get_parent().get_node("SidePanel").Update_Coins(10)
"StickTrap":
get_parent().get_node("SidePanel").Update_Coins(5)
"Wall":
get_parent().get_node("SidePanel").Update_Coins(0)
i.get_parent().queue_free()
queue_free()
pass