semi-idle-arpg/scripts/test_scene.gd

34 lines
1.4 KiB
GDScript3
Raw Normal View History

2024-09-19 19:03:06 -06:00
extends Control
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 = randi_range(0, 10)
var anNPC = NPC.new(rand_difficulty, rand_tier)
var TestMaxHealthVal = $MarginContainer/HBoxContainer/Output/TestMaxHealthVal
TestMaxHealthVal.text = str(anNPC.maxHealth)
#TestMaxHealthVal.label_settings = LabelSettings.new()
TestMaxHealthVal.label_settings.outline_size = 4
TestMaxHealthVal.label_settings.outline_color = Color("#1D2021")
match anNPC.npcDifficulty:
NPC.npcDifficulties.MINION:
TestMaxHealthVal.label_settings.font_color = Color.LIGHT_GRAY
NPC.npcDifficulties.NORMAL:
TestMaxHealthVal.label_settings.font_color = Color.SEA_GREEN
NPC.npcDifficulties.MINIBOSS:
TestMaxHealthVal.label_settings.font_color = Color.ROYAL_BLUE
NPC.npcDifficulties.BOSS:
TestMaxHealthVal.label_settings.font_color = Color.PURPLE
NPC.npcDifficulties.ELITEBOSS:
TestMaxHealthVal.label_settings.font_color = Color.ORANGE
NPC.npcDifficulties.BBEG:
TestMaxHealthVal.label_settings.font_color = Color.GOLD
TestMaxHealthVal.label_settings.outline_size = 8
TestMaxHealthVal.label_settings.outline_color = Color.DARK_RED
#anNPC.position = Vector2(64, 64)
#add_child(anNPC)