You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
842 B

6 months ago
extends DialogicAnimation
func animate():
var tween := (node.create_tween() as Tween)
tween.set_ease(Tween.EASE_IN_OUT).set_trans(Tween.TRANS_SINE)
var strength :float = node.get_viewport().size.y/40
tween.tween_property(node, 'position:y', orig_pos.y+strength, time*0.2)
tween.tween_property(node, 'position:y', orig_pos.y-strength, time*0.1)
tween.tween_property(node, 'position:y', orig_pos.y+strength, time*0.1)
tween.tween_property(node, 'position:y', orig_pos.y-strength, time*0.1)
tween.tween_property(node, 'position:y', orig_pos.y+strength, time*0.1)
tween.tween_property(node, 'position:y', orig_pos.y-strength, time*0.1)
tween.tween_property(node, 'position:y', orig_pos.y+strength, time*0.1)
tween.tween_property(node, 'position:y', orig_pos.y, time*0.2)
tween.finished.connect(emit_signal.bind('finished_once'))