Of course we have our ship’s movements to consider for animation, but let’s start with something simple for now. We’ve introduced the Triple Shot laser power up previously. We’re adding a splash of color to the game with it, and animating it should catch the player’s eye, even if we have some more colorful enemies eventually.
Creating an animation is fairly simple, simply select the game object and then go to Window > Animation > Animation in order to open up the Animation window, which we’ve docked next to the console. Click Create in order to add the animation, typically stored in the Assets > Animations folder. In general, add the _anim suffix to easily locate/filter the animations when you have hundreds or thousands of assets.
Subsequently, click the little record button and simply drag the sprites (preferably ordered by file name in sequence of animation) into the animation video. You can play to confirm animation looks as intended:
Then, when you stop recording, an animation with the name you selected, as well as an Animation Controller with the same name as the asset are added under the Animations folder.