Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add animation support #1547

Merged
merged 7 commits into from
May 2, 2023
Merged

Add animation support #1547

merged 7 commits into from
May 2, 2023

Conversation

Jowan-Spooner
Copy link
Collaborator

So this is a system where the animations are completely implemented in the layout scene by the user. All they have to do is to call Dialogic.Animation.now_animating() when receiving the signal and call Dialogic.Animation.animation_finished() once done. This way dialogic knows exactly when to continue.

I had to change some things. For example the textboxes now are hidden by default until some text is shown. This can be changed with a setting called "Hide textbox when empty"
This makes scenes with no text much easier. Currently the way to trigger this is to add a wait event that hides the text box. Then it will again only be shown once any text event updates it.

For all of this to work I had to make sure the clear method is called each time a dialog is newly instanced. Unfortunately that meant I had to specify to the clear method what to clear because Variables for example should NOT always be cleared. This introduced a ClearFlags enum on the dialogicgame handler. I hope it's a good addition. It could prove useful in the future.

When opening a visual timeline while another one is still loading (fairly common with longer timelines) the last batch would always still be added to the newly opened timeline. A new check now waits for the last batch of the previous timeline before clearing the timeline.
For most games you want variables to be persistent unless loading a new save.
However many things should be reset when a new dialog opens. So I've added clear-flags to the dialogic game handler. These can be used with the clear() method. Most of the time now (at timeline end or dialog start) it won't reset the variables (only at game startup or loading a save).

This system should be expandable.
@coppolaemilio coppolaemilio merged commit d39eef9 into main May 2, 2023
@coppolaemilio
Copy link
Collaborator

Thanks!

@Jowan-Spooner Jowan-Spooner deleted the animation-improvements branch May 24, 2023 22:38
Jowan-Spooner added a commit that referenced this pull request Jul 29, 2023
Hopefully didn't miss any.
Unfortunately this is a giant change.
Jowan-Spooner added a commit that referenced this pull request Jul 30, 2023
Hopefully didn't miss any.
Unfortunately this is a giant change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Textbox hiding and animations
2 participants