added sideprofile animations
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user