// OnTriggerEnter is called once per frame private void OnTriggerEnter(Collider other) { if (other.name != "Player") { HealthLevel.SubValue(.1f); } }
private void OnTriggerEnter(Collider other) { if (other.tag == "Zombie") { Health.SubValue(.1f); } if (Health.GetValue() <= 0) { GetComponent <ParticleSystem>().enableEmission = true; gameObject.SetActive(false); RestartButton.transform.localScale = new Vector3(1, 1, 1); } }