snozbot / fungus

An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more.
MIT License
1.63k stars 290 forks source link

Added object toggling to LeanTween and TweenUI #940

Open Arylos07 opened 3 years ago

Arylos07 commented 3 years ago

Description

Added a Disable On Finished toggle (disabled by default) that, if enabled, disables the target objects of LeanTween and TweenUI commands once the tween is finished.

Tween commands also enable the target objects before starting the tween. This does not have a way to disable at this time since there are very few cases where tweening a disabled object are viable.

Disable On Finished uses an Invoke to work, meaning any cancel invokes and Stop Tween commands will prevent the command from disabling the target object.

What is the current behavior?

What is the new behavior?

Important Notes

Other information

Important: because I did a silly, this PR includes changes from PR #934 which contains an optional boolean to Writer Audio. When merging this branch, 934 can be deleted as this already contains it.

The changes will affect the following scenarios:

This change was prompted by this discussion on Discord

Screenshot_46 Screenshot_47