You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

122 lines
2.7 KiB
GDScript

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"
@onready var areas = $"../Upgrades/Control/AreaScroll"
@onready var tools = $"../Upgrades/Control/ToolScroll"
func _ready():
for child in allUp:
child.visible = false
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
func _on_areas_pressed():
if areas.visible == false:
for child in allUp:
child.visible = false
areas.visible = true
else:
if upgrades.visible == false:
upgrades.visible = true
else:
upgrades.visible = false
func _on_tools_pressed():
if tools.visible == false:
for child in allUp:
child.visible = false
tools.visible = true
else:
if upgrades.visible == false:
upgrades.visible = true
else:
upgrades.visible = false