Step 7

Finish the attack function


Complete the attack by adding a pause and setting the sprite back to a Player kind.

You can find pause in the Loops section.

Set pause to 400 ms, this is the length of all our frames combind (100ms x 4 frames = 400ms).

Attack button


Next we will set up the ‘B‘ Button to call on the attack function we created.

Test your animation


Test and see if your animation is playing well in the game!