extends Node2D
onready var tween_values = [0, 10]
func _enter_tree():
var tween = Tween.new()
add_child(tween)
func _ready():
_start_tween()
func _start_tween():
$Tween.interpolate_property(..., tween_values.[0], tween_values[1], ...)
$Tween.start()
func _on_tween_completed(object, key):
tween_values.invert()
_start_tween()
Or you could set up two tweens and make them call each other at the tween_completed signal. Connect the signal via the inspector tab "signals" or via code:
connect("tween_completed", self, "on_tween_completed")
That's all. :P