In this video we're going to extend Megaman's damage animation sequence by adding in a period of flashing invincibility. This allows him time to escape from situations where he may be cornered and not face an instant death by repeatedly getting hit. There are a couple ways we can achieve the flashing effect in Unity: toggling the sprite renderer material or its color alpha. We'll settle upon using the color alpha because in some cases I have had the material option not always work, nevertheless I show both choices for learning purposes.
Source code for this project can be found on my GitHub: https://github.com/tonybhimani/unity-megaman-tutorials
and you can see my other videos for the main project here: https://www.youtube.com/playlist?list=PLfKMG2CcLNaIRt-vDMszk6Oym_0gbPe4N
Enjoy!
Direct comments, suggestions, and questions to my new Discord server.
https://discord.gg/4XEwwqaVf9