monsterfangen/scenes/ui/monster_list_entry.gd

28 lines
745 B
GDScript

extends HBoxContainer
class_name MonsterListEntry
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func populate(monster) -> void:
# thumbnail
# id
# name
# level
# health
# healthprogress
# experience
%MonsterID.text = str(0)
%MonsterName.text = monster.name
%MonsterLevel.text = "Lvl. %s" % monster.level
%HealthProgressBar.value = monster.health
%HealthProgressBar.max_value = monster.max_health
%ExperienceProgressBar.value = monster.experience
%ExperienceProgressBar.max_value = monster.experience_for_next_level