semi-idle-arpg/scripts/test_scene.gd

23 lines
759 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()
%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)