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

15 lines
632 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 scale = DialogicAnimaPropertiesHelper.get_scale(data.node)
var frames = [
{ percentage = 0, from = scale * Vector2(1, 1) },
{ percentage = 14, to = scale * Vector2(1.3, 1.3) },
{ percentage = 28, to = scale * Vector2(1, 1) },
{ percentage = 42, to = scale * Vector2(1.3, 1.3) },
{ percentage = 70, to = scale * Vector2(1, 1) },
{ percentage = 100, to = scale * Vector2(1, 1) },
]
DialogicAnimaPropertiesHelper.set_2D_pivot(data.node, DialogicAnimaPropertiesHelper.PIVOT.CENTER)
anima_tween.add_frames(data, "scale", frames)