extends CanvasLayer @onready var upgrades = $"../Upgrades" @onready var allUp = $"../Upgrades/Control".get_children() @onready var vanUp = $"../Upgrades/Control/VanScroll" @onready var chocUp = $"../Upgrades/Control/ChocScroll" @onready var strawUp = $"../Upgrades/Control/StrawScroll" @onready var rvelUp = $"../Upgrades/Control/RVelScroll" @onready var cinUp = $"../Upgrades/Control/CinScroll" @onready var honUp = $"../Upgrades/Control/HonScroll" @onready var nightUp = $"../Upgrades/Control/NightScroll" func _on_van_pressed(): if vanUp.visible == false: for child in allUp: child.visible = false vanUp.visible = true else: if upgrades.visible == false: upgrades.visible = true else: upgrades.visible = false func _on_choc_pressed(): if chocUp.visible == false: for child in allUp: child.visible = false chocUp.visible = true else: if upgrades.visible == false: upgrades.visible = true else: upgrades.visible = false func _on_straw_pressed(): if strawUp.visible == false: for child in allUp: child.visible = false strawUp.visible = true else: if upgrades.visible == false: upgrades.visible = true else: upgrades.visible = false func _on_r_vel_pressed(): if rvelUp.visible == false: for child in allUp: child.visible = false rvelUp.visible = true else: if upgrades.visible == false: upgrades.visible = true else: upgrades.visible = false func _on_cin_pressed(): if cinUp.visible == false: for child in allUp: child.visible = false cinUp.visible = true else: if upgrades.visible == false: upgrades.visible = true else: upgrades.visible = false func _on_honest_pressed(): if honUp.visible == false: for child in allUp: child.visible = false honUp.visible = true else: if upgrades.visible == false: upgrades.visible = true else: upgrades.visible = false func _on_nightmare_pressed(): if nightUp.visible == false: for child in allUp: child.visible = false nightUp.visible = true else: if upgrades.visible == false: upgrades.visible = true else: upgrades.visible = false