DOTween FTW!
Wow... just wow... lol
So last post I was feeling good about the implementation of my Gate Animator being so "lightweight". But then I shared the Gate animation GIF in Discord (special shout to Wokarol and Tarodev for really preaching the good word) and was immediately bombarded with recommendations- nay WARNINGS to use DOTween as an animation solution over Unity's Animator!
This was my initial approach (my bad if not aligning the states triggers your OCD 🤣). Fairly straightforward; it listens to a single boolean value to transition from one state to the next. But 3 animations AND an animator AND an animator controller script was just for one Gate! Definitely something I don't want to continue doing for every different form of Gate in my game.
In comes DOTween! It's a little (a lot) more script focused but very easily parameterized.
On the left is my Activator receiver script where it sets the start and end rotations and plays the tween. I parameterized everything I fed into the Tweener and am able to modify it in the inspector. I'm even able to set the ease of the Tween to an animation curve to give it a custom bounciness!
All in all, I'm happy with DOTween as a solution. It's crazy because this prototype is still very much in its infancy but just by sharing the little progress I make, I'm met with very helpful developers that are eager to share their thoughts and opinions on it! I don't have to act on every piece of advice I'm given but, in this case, I'm glad I did!
Get Hi and Lo
Hi and Lo
Two characters, one controller
Status | Prototype |
Author | K&D Games |
Genre | Platformer, Puzzle |
Tags | 2D, Controller, Difficult, Hand-drawn, Puzzle-Platformer, Sprites |
Languages | English |
More posts
- Searched Hi&Lo for an Art DirectionJun 12, 2022
- Floppy GatesMay 23, 2022
- "Switching" things upMay 22, 2022
- Hello Worl-itch!May 21, 2022
Leave a comment
Log in with itch.io to leave a comment.