Files
slopvivors/scenes/managers/ui/level_up_ui.gd

20 lines
444 B
GDScript

class_name LevelUpUI
extends Control
@onready
var choice_container: HBoxContainer = $VBoxContainer/PanelContainer/CenterContainer/ChoiceContainer
func clear():
for child in choice_container.get_children():
child.queue_free()
func add_choice(choice: LevelUpChoice) -> void:
choice.lvlup_picked.connect(_on_levelup_picked)
choice_container.add_child(choice)
func _on_levelup_picked(mod: PlayerStatsModifier) -> void:
visible = false