flo-wolf / Flip-Fall

Flip Fall - Mobile Arcade Platformer, made with Unity. Available on the Play Store
https://play.google.com/store/apps/details?id=com.florianwolf.flipfall
Other
22 stars 4 forks source link

Detailed: How to create better in- and out-animations between the scenes. #40

Closed flo-wolf closed 8 years ago

flo-wolf commented 8 years ago

Instead of fading to black just move the UI components outside of the screen, do that by attaching a grouping script to all bigger UI component groups (i.e. upper button bar, info texts, buttom button bar, option1, option2, option3...) that should move out as one. The script has a public variable with an id. zero would point to the very first group that gets moved away. Also add a float to define the delay from this instance fade-out to the next one.

Then, in the UIFadeManager script, begin move-out animations for all ui-groups, one after another, using the set delays to create a cool effect. As soon as all element are outside of the visible area, switch to another Scene (watch out for bg-animation lag upon switching). In the next level, each group gets moved in again with a delay, 0 is again first.

Extra: Add different fade-out animation sets, allow switching by enum. these sets can also have custom delaytimings.

flo-wolf commented 8 years ago

Done!