How to make a card Game attack animation
Hey, im making a tradeable card game, kinda like Hearthstone and Im having a problem on how to implement the attack animation. I have a programming background but im new with unity.
The cards on the field are parented to a gameObject with a Grid Layout component, either to the "Player Grid" or to the "Enemy Grid". When its your turn, you can select a card on your grid and then select an enemy card.
....
I was wondering if is there any way to do animations with passed parameters. For example, create an animation with at the first frame the position of the gameObject is at its transform.position, at the middle of the animation goes to the target transform.position and finally came back.
....
Should it be better to do it via code?, If so which methods would you recomend? I think ill have to unparent cards from the grids and work with global values in order to work. Doing that, would move the other remaining cards on the grid, cause an element of the layout was unparented.
....
I haven't imagined any not tricky solution, and I dont have much experience with Unity API, so that's why im asking.
Thanks in advance.