SpielBackupAlt/addons/dialogic/Nodes/Anima/animations/attention_seeker/swing.gd

13 lines
448 B
GDScript3
Raw Permalink Normal View History

2024-12-26 14:54:06 +00:00
func generate_animation(anima_tween: Tween, data: Dictionary) -> void:
var frames = [
{ percentage = 0, from = 0 },
{ percentage = 20, to = 15 },
{ percentage = 40, to = -10 },
{ percentage = 60, to = 5 },
{ percentage = 80, to = -5 },
{ percentage = 100, to = 0 },
]
DialogicAnimaPropertiesHelper.set_2D_pivot(data.node, DialogicAnimaPropertiesHelper.PIVOT.TOP_CENTER)
anima_tween.add_frames(data, "rotation", frames)