-
Notifications
You must be signed in to change notification settings - Fork 42
IAnimatorFacade
Animator Facade is a class that is in charge of connecting the character with the animator. The animator should be on the same gameobject where the mesh is.
There are two interfaces that are being used:
- IAnimatorFacade
- ICharacterAnimator
IAnimatorFacade | ICharacterAnimator |
---|---|
Let's have a look at how we set landing animation. First, we have to check if the current animation is unskippable or not. If it's not we can start the landing animation, if it is we shouldn't play it. Then, we are going to play the landing animation, we should say to the animator that we are not falling anymore. We can make all of this in one class, but I found it more convenient to divide the logic part and the "animator" part into two classes. We are going to communicate with an animator mainly through the IAnimatorFacade(there could be some exceptions but creating that kind of communication is highly recommended).
IAnimatorFacade | ICharacterAnimator |
---|---|