added sideprofile animations

This commit is contained in:
2026-02-25 18:58:45 +01:00
parent d036169237
commit 602e5595ca
51 changed files with 835 additions and 201 deletions

View File

@@ -71,6 +71,11 @@ func _ability_process(delta:float) -> void :
func _get_body_parts() -> Array :
var clist : Array
for a in self.get_children() :
if a is AnimatedSprite2D :
if a is BodyPart :
clist.append(a)
return clist
func _animate(b : BodyPart, animation_type : String) -> void :
for anim_name : String in b.sprite_frames.get_animation_names() :
if anim_name.contains(animation_type) && anim_name.contains(model_name) && anim_name.contains(str(MachineGlobals.look_direction.keys()[look_dir])) :
b.play(anim_name)