17. 2D Platformer in Unity: Combat & Cinematic Respawning

Welcome to Part 17, the final video of Phase 3! We have a pacing enemy, but right now we just harmlessly bump into each other. Today, we draw our swords! We are building a melee combat system using Physics2D.OverlapCircle to detect enemy hits. Then, we are going to learn how to create a cinematic 2-second death sequence using a powerful C# tool called a Coroutine. In this video, you will learn: How to use Animator Triggers for one-shot animations (Attacking and Dying). How to recycle Physics2D.OverlapCircle to create an invisible weapon hitbox. How to use OnCollisionEnter2D to take damage from enemies. How to write an IEnumerator Coroutine to pause code execution (yield return new WaitForSeconds). #unity6 #gamedev #2dplatformer #csharp #learntocode #gameprogramming