Fixed hang when TweenChannel.sync is called too late.
This commit is contained in:
parent
eb720b6188
commit
14e4ea41fb
|
@ -70,9 +70,10 @@ func create_tween(target: Variant) -> Tween:
|
||||||
##
|
##
|
||||||
## The given tween must have been created with self.create_tween.
|
## The given tween must have been created with self.create_tween.
|
||||||
func sync(what: Tween) -> void:
|
func sync(what: Tween) -> void:
|
||||||
var last_terminated: Tween = null
|
if what and what.is_valid():
|
||||||
while last_terminated != what:
|
var last_terminated: Tween = null
|
||||||
last_terminated = await terminated
|
while last_terminated != what:
|
||||||
|
last_terminated = await terminated
|
||||||
|
|
||||||
## Yields until the given tween is invalid and then cleans up bookkeeping.
|
## Yields until the given tween is invalid and then cleans up bookkeeping.
|
||||||
##
|
##
|
||||||
|
|
Loading…
Reference in New Issue