Files
ClickerGacha/User Interface/Member1.gd
2024-06-18 11:33:55 -04:00

32 lines
713 B
GDScript

extends TextureButton
# Called when the node enters the scene tree for the first time.
func _ready():
# Connect the pressed signal to the _on_Button_pressed function
self.connect("pressed", Callable(self, "_on_Button_pressed"))
func _process(delta):
#Checks if the texture needs to be set
if Global.texture_member1:
self.texture_normal = load(Global.texture_member1)
# Function to handle the button press
func _on_Button_pressed():
#MemberDatabase.load_character_data()
get_tree().change_scene_to_file("res://Scenes/teamSelection.tscn")
Global.currentMemberSelected = 0
Global.teamScreenVisible = false
Global.teamSelectionVisible = true
#Function to set texture of the button