Why isnt this working then?
func applyTweens():
while true:
print("Tween Starting")
tweenExpand.interpolate_property(self, "scale", Vector2(1.0,1.0), Vector2(2.0,2.0),2,Tween.TRANS_LINEAR)
tweenExpand.start()
yield(tweenExpand,"tween_completed")
print("tweenExpand Ended")
tweenContract.interpolate_property(self, "scale", Vector2(2.0,2.0), Vector2(1.0,1.0),2,Tween.TRANS_LINEAR)
tweenContract.start()
yield(tweenContract,"tween_completed")
print("tweenContract Ended")
This just generates this output then stops. It expands, contracts, expands then stops....
Tween Starting
tweenExpand Ended
tweenContract Ended
Tween Starting
tweenExpand Ended
Where as if I just use one tween instance to do the expansion and contraction it works, but I don't understand why.
func applyTweens():
while true:
print("Tween Starting")
tweenExpand.interpolate_property(self, "scale", Vector2(1.0,1.0), Vector2(2.0,2.0),2,Tween.TRANS_LINEAR)
tweenExpand.start()
yield(tweenExpand,"tween_completed")
tweenExpand.interpolate_property(self, "scale", Vector2(2.0,2.0), Vector2(1.0,1.0), 2,Tween.TRANS_LINEAR)
tweenExpand.start()
yield(tweenExpand,"tween_completed")