bool damaged; // True when the player gets damaged. void Awake () { // Setting up the references. anim = GetComponent <Animator> (); playerAudio = GetComponent <AudioSource> (); playerMovement = GetComponent <PlayerMovement> (); playerShooting = GetComponentInChildren <PlayerShooting> (); // Set the initial health of the player. currentHealth = startingHealth; }