void damageShip() { // Debug.Log ("health: " + health); health--; if (health == 3) { hurtSource.PlayOneShot(hurt, 1f); statusTextScript.setGood(); } if (health == 2) { hurtSource.PlayOneShot(hurt, 1f); statusTextScript.setDamaged(); } if (health == 1) { hurtSource.PlayOneShot(hurt, 1f); statusTextScript.setCritical(); } if (health <= 0) { hurtSource.PlayOneShot(explode, 1f); shipExplode(); } }