Fix anim HUD

This commit is contained in:
VAILLANT Jeremy
2021-06-26 15:42:02 +02:00
parent a33ecafb81
commit 301ef3f916
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -223,15 +223,14 @@ func _node_object_list(key):
for child in $ListObjects/ListContainer.get_children():
if child.has_meta("name"):
name = var2str(child.get_meta("name"))
if name == meshes[key].label():
if child.get_meta("name") == meshes[key].label():
child.set_meta("counted", child.get_meta("counted") + 1)
if child.get_meta("counter") == child.get_meta("counted"):
animation_played = name
animation_played = child.get_meta("name")
else:
var diff = child.get_meta("counter") - child.get_meta("counted")
var txt = name
var txt = child.get_meta("name")
if diff != 1:
txt = txt + " " + String(diff)
animation_played = child.get_meta("animation")