23 lines
753 B
GDScript
23 lines
753 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.NPCDifficulty.values().pick_random()
|
|
var rand_tier = NPC.NPCTier.values().pick_random()
|
|
var anNPC = NPC.new()
|
|
%TestNMEMaxHealthVal.text = str(anNPC.maxHealth)
|
|
#TestEMaxHealthVal.label_settings = LabelSettings.new()
|
|
%TestNMEName.text = str(NPC.NPCDifficulty.find_key(anNPC.npcDifficulty))
|
|
%TestNMETierVal.text = str(NPC.NPCTier.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)
|