1 extends DialogicAnimation
4 func animate() -> void:
5 var tween := (node.create_tween() as Tween)
7 var end_scale: Vector2 = node.scale
8 var end_modulate_alpha := 1.0
9 var modulation_property := get_modulation_property()
12 end_scale = Vector2(0, 0)
13 end_modulate_alpha = 0.0
16 node.scale = Vector2(0, 0)
17 var original_modulation: Color = node.get(modulation_property)
18 original_modulation.a = 0.0
19 node.set(modulation_property, original_modulation)
22 tween.set_ease(Tween.EASE_IN_OUT)
23 tween.set_trans(Tween.TRANS_SINE)
26 (tween.tween_property(node, "scale", end_scale, time)
27 .set_trans(Tween.TRANS_SPRING)
28 .set_ease(Tween.EASE_OUT))
29 tween.tween_property(node, modulation_property + ":a", end_modulate_alpha, time)
35 func _get_named_variations() -> Dictionary:
37 "bounce in": {"reversed": false, "type": AnimationType.IN},
38 "bounce out": {"reversed": true, "type": AnimationType.OUT},