private void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "trap") { damageCalc.health -= damageTaken; damageCalc.healthBarManager(); } }
// Update is called once per frame void Update() { countDown -= Time.deltaTime; if (countDown <= 0) { explode(); damageCalc.healthBarManager(); } }