File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,12 @@ func _ready():
3939 if Engine .is_editor_hint () == false :
4040 LoadAnimations ()
4141
42- func play (animation : LPCAnimation ):
42+ func play (animation : LPCAnimation , fps : float = 5.0 ):
4343 var sprites = get_children () as Array [AnimatedSprite2D ]
4444 for sprite in sprites :
4545 if sprite .sprite_frames .has_animation (AnimationNames [animation ]):
4646 sprite .visible = true
47+ sprite .sprite_frames .set_animation_speed (AnimationNames [animation ], fps )
4748 sprite .play (AnimationNames [animation ])
4849 else :
4950 sprite .visible = false
Original file line number Diff line number Diff line change 33name =" LPCAnimatedSprite"
44description =" "
55author =" Alexandro Trevisan"
6- version =" 4.1.2.4 "
6+ version =" 4.1.3.1 "
77script =" LPCAnimatedSprite.gd"
You can’t perform that action at this time.
0 commit comments