I'm making a three in line game with godot, but i'm having an issue.
First time when swapping cells, the animation of swapping and the elimination of cells (in the case of making 3 or more cell aligned in a line) played both at the same time.
So i refactored a bit the code, now i have queue for each cell that manages the animation to be played one by one.
Now my problem is this, the cells that the player swaps, they do fine, the play the swap animation then the elimination animation. the problem are the other cells in the line, those get removed as the first cells are playing the swap animation first and then elimination animation.
| * | Step 1 | Step 2 | | cells in line | remove animation| nothing | | swaped cells | swap animation | remove animation|
in case i didn't explained well i left a more graphic description of the flow of the animation steps.
this is how i want the animation to be played
| * | Step 1 | Step 2 | | cells in line | nothing | remove animation| | swaped cells | swap animation | remove animation |
I'm not sure how to solve the problem, each cell manages their animations in the queue.