void OnTriggerExit(Collider other) { if (other.tag.Contains("'Door'")) { canFlip = false; } if (other.tag.Contains("'Back'")) { flipType = doors.Back; } if (other.tag.Contains("'Ice'")) { isSliding = false; } if (other.tag.Contains("'Tele")) { teleLoc = Vector3.zero; } if (other.tag.Contains("'Switch'")) { toggleLink = null; } if (other.tag.Contains("'Water'")) { isSwimming = false; } }
//Triggers void OnTriggerEnter(Collider other) { if (other.tag == "Door") { canFlip = true; } if (other.tag.Contains("'Spike'")) { manager.iDied(); } if (other.tag.Contains("'Ice'")) { isSliding = true; } if (other.tag.Contains("'Fall'")) { other.GetComponent <fallBlock>().set(true); } if (other.tag.Contains("'Tele'")) { teleLoc = other.GetComponent <teleportBlock>().teleport(); } if (other.tag.Contains("'Switch'")) { toggleLink = other.GetComponent <activateToggle>(); } if (other.tag.Contains("'Water'")) { isSwimming = true; fallCount = 1; jumpCount = 1; waterJump = true; } }