21 lines
653 B
GDScript
21 lines
653 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:
|
|
%MonsterID.text = str(0)
|
|
%MonsterName.text = monster.display_name
|
|
%MonsterLevel.text = "Lvl. %s" % monster.level
|
|
%HealthProgressBar.value = monster.health
|
|
%HealthProgressBar.max_value = monster.health
|
|
%ExperienceProgressBar.value = monster.xp
|
|
%ExperienceProgressBar.max_value = monster.base_xp_for_next_level
|