private void OnTriggerExit(Collider other) { if (other.tag == "Shop") { TriggeredShop?.Invoke(false); inShop = false; Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; } }
private void OnTriggerEnter(Collider other) { if (other.tag == "Shop") { TriggeredShop?.Invoke(true); inShop = true; Cursor.lockState = CursorLockMode.None; Cursor.visible = true; } if (other.name.Contains("BurntArea")) { SetOnFire(); } if (other.name.Contains("Earthquake")) { ReceiveDamage(15f); } if (other.name.Contains("Charco")) { SetExhausted(); } }