Damage VFX using Animated Sprites
<p>Since my last article, I have added an asteroid to the beginning of the game, which once destroyed begins the wave of enemies. I also added a thruster to the player.</p>
<p><img alt="" src="https://miro.medium.com/v2/resize:fit:770/1*aC5n4Aek4aTksXLZlutLxg.gif" style="height:438px; width:700px" /></p>
<p>Shooting the asteroid begins the game by spawning the wave of enemies.</p>
<p>Today I am going to add sprites with animation for when the player is damaged. I start by dragging my sprites to player. I set the scale and adjust the sprites so they are in position, one on each side.</p>
<p><img alt="" src="https://miro.medium.com/v2/resize:fit:318/1*I-5Z8FBdzWMUT20F2WslPw.png" style="height:310px; width:289px" /></p>
<p>I then turn them off by unchecking the box by their name in the inspector.</p>
<p><img alt="" src="https://miro.medium.com/v2/resize:fit:535/1*a8R1e-yCa3AnEopFQJ5xpA.png" style="height:77px; width:486px" /></p>
<p>I now need to update the player script. The first time the player is damaged and they only have two lives left, the left engine will be damaged, and when they player gets down to one life, the right engine will be damaged.</p>
<p>I create variables for the damage and then go back to Unity, click on Player, and then add the left and right engine damage sprites.</p>
<p><a href="https://medium.com/@sherryw17/damage-vfx-using-animated-sprites-f34d851666ad"><strong>Read More</strong></a></p>