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

13 lines
523 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 = 50, to = scale * Vector2(1.05, 1.05), easing = anima_tween.EASING.EASE_IN_OUT_SINE },
{ percentage = 100, to = scale * Vector2(1, 1) },
]
DialogicAnimaPropertiesHelper.set_2D_pivot(data.node, DialogicAnimaPropertiesHelper.PIVOT.CENTER)
anima_tween.add_frames(data, "scale", frames)