// Update is called once per frame void Update() { if (carry != null && grabbedKey != 0) { carry.transform.parent = transform; } if (K1 && K2 && K3) { script.setWin(); } timeCount += Time.deltaTime; if (timeCount >= dryOutTime) { liquid -= 10; Debug.Log("Drier"); timeCount = 0; } if (liquid <= 0) { Debug.Log("Dead"); deathScreen.SetActive(true); Invoke("respawn", 3f); liquid = maxLiquid; } }