void OnTriggerEnter(Collider other) { if (other.gameObject.CompareTag("d2")) { life.dealDmg(1); } if (other.gameObject.CompareTag("oob")) { uiC.Oob(); } if (other.gameObject.CompareTag("Finish")) { uiC.win = true; life.Dead(); } }
void OnCollisionEnter(Collision col) { if (col.gameObject.CompareTag("Player")) { if (t == 0) { life.dealDmg(1); t = hitTime; } } }
void OnCollisionEnter(Collision other) { if (!other.gameObject.CompareTag("Player")) { move = move * -1; } if (other.gameObject.CompareTag("Player")) { if (t == 0) { life.dealDmg(dmgDealt); t = hitTimer; } } }