semi-idle-arpg/scripts/test_scene.gd
2024-10-03 06:45:13 -06:00

23 lines
785 B
GDScript

extends Control
@onready var styling: Control = $Styling
func _on_exit_button_pressed() -> void:
get_tree().quit()
func _on_test_button_pressed() -> void:
var rand_difficulty = NPC.npcDifficulties.values().pick_random()
var rand_tier = NPC.npcTiers.values().pick_random()
var anNPC = NPC.new(rand_difficulty, rand_tier)
%TestNMEMaxHealthVal.text = str(anNPC.maxHealth)
#TestEMaxHealthVal.label_settings = LabelSettings.new()
%TestNMEName.text = str(NPC.npcDifficulties.find_key(anNPC.npcDifficulty))
%TestNMETierVal.text = str(NPC.npcTiers.find_key(anNPC.npcTier))
# style the name label based on the difficulty
styling.format_label_difficulty(%TestNMEName, anNPC.npcDifficulty)
#anNPC.position = Vector2(64, 64)
#add_child(anNPC)