You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A game that has a complex set of animated graphics that needs to play in sequence and parallel.
Describe the problem or limitation you are having in your project
Synchronizing several animated objects, some of which have either unknown or hard to calculate durations at the time they are started.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
It would be useful to have methods added to Tween that allow you to wait for a signal. Right now there are no methods in Tween that will allow you to wait for a signal. While you can use the await keyword to block, it becomes very messy to combine tween animations with await statements. It would be helpful to have a similar functionality added to the Tween object.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Add a method to Tween like wait_for_signal(target_object, signal_name:String, validate_callback:Callable = null). This would create a new Tweener object that simply blocks until the signal is received.
target_object - Object to wait for a signal from
signal_name - Signal to wait for
validate_callback - An optional validation method. If present, the arguments from the signal are passed as parameters to the callback. If it returns true, the wait condition will be considered finished. Otherwise, it will continue waiting.
If this enhancement will not be used often, can it be worked around with a few lines of script?
You can use the await method to block, but this forces you to split your tween into several different tweens and intersperse them with statements. It would be better to be able to create a single tween that can just wait for signals.
Is there a reason why this should be core and not an add-on in the asset library?
Requires modifying the Tween object.
The text was updated successfully, but these errors were encountered:
Describe the project you are working on
A game that has a complex set of animated graphics that needs to play in sequence and parallel.
Describe the problem or limitation you are having in your project
Synchronizing several animated objects, some of which have either unknown or hard to calculate durations at the time they are started.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
It would be useful to have methods added to Tween that allow you to wait for a signal. Right now there are no methods in Tween that will allow you to wait for a signal. While you can use the
await
keyword to block, it becomes very messy to combine tween animations with await statements. It would be helpful to have a similar functionality added to the Tween object.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Add a method to Tween like
wait_for_signal(target_object, signal_name:String, validate_callback:Callable = null)
. This would create a new Tweener object that simply blocks until the signal is received.target_object - Object to wait for a signal from
signal_name - Signal to wait for
validate_callback - An optional validation method. If present, the arguments from the signal are passed as parameters to the callback. If it returns true, the wait condition will be considered finished. Otherwise, it will continue waiting.
If this enhancement will not be used often, can it be worked around with a few lines of script?
You can use the
await
method to block, but this forces you to split your tween into several different tweens and intersperse them with statements. It would be better to be able to create a single tween that can just wait for signals.Is there a reason why this should be core and not an add-on in the asset library?
Requires modifying the Tween object.
The text was updated successfully, but these errors were encountered: