1 extends DialogicAnimation
3 func animate() -> void:
4 var tween := (node.create_tween() as Tween)
6 var start_height: float = base_position.y + node.get_viewport().size.y / 5
7 var end_height := base_position.y
9 var start_modulation := 0.0
10 var end_modulation := 1.0
13 end_height = start_height
14 start_height = base_position.y
16 start_modulation = 1.0
18 node.position.y = start_height
20 tween.set_ease(Tween.EASE_OUT)
21 tween.set_trans(Tween.TRANS_SINE)
24 var end_postion := Vector2(base_position.x, end_height)
25 tween.tween_property(node, "position", end_postion, time)
27 var property := get_modulation_property()
29 var original_modulation: Color = node.get(property)
30 original_modulation.a = start_modulation
31 node.set(property, original_modulation)
32 var modulation_alpha := property + ":a"
34 tween.tween_property(node, modulation_alpha, end_modulation, time)
40 func _get_named_variations() -> Dictionary:
42 "fade in up": {"reversed": false, "type": AnimationType.IN},
43 "fade out down": {"reversed": true, "type": AnimationType.OUT},