private void OnTriggerEnter(Collider other) { GetComponent <AudioSource>().PlayOneShot(baseHitSFX); health -= healthDecrement; baseScore.SetHealth(health); if (health <= 0) { SelfDestruct(); } }
private void Start() { baseScore = FindObjectOfType <BaseScore>(); baseScore.SetHealth(health); }