Damage Behavior

  1. Open the Player script.
  2. Head down below the Damage() method.
  3. Make an “IEnumerator InvulnerabilityRoutine()” method:

Code for Quitting your Game

  1. Open the GameManager script you made before, then add this if statement to the Update() method!
  • Note: This feature does not work in the Unity editor, you will need to test it in a build of your game!

Marcus Cohee

Hello all! I am starting Unity and learning the rope as I go!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store