private void Update() { float currentAmount = ResourcesMaster.GetResourceAmount(displayedResource); if (currentAmount != lastDisplayedAmount) { lastDisplayedAmount = currentAmount; UpdatePurpleLiquidScale(); } }
private void Update() { float currentAmount = ResourcesMaster.GetResourceAmount(displayedResource); if (currentAmount != lastDisplayedAmount) { lastDisplayedAmount = currentAmount; CreateNewBottles(); } }
private void Update() { if (isCounting) { if (currentTime < 0f) { GameOver(); } else { DecreaseTimer(); } } if (!bottlingActivity.gameObject.activeSelf && ResourcesMaster.GetResourceAmount("juice") >= ResourcesMaster.GetResourceData("bottle").requiredToGeneratedRatio) { bottlingActivity.gameObject.SetActive(true); currentProgressionState = ActivitiesProgression.Bottling; } if (Input.GetButtonDown("Reset")) { System.GC.Collect(); SceneManager.LoadScene(SceneManager.GetActiveScene().name); } else if (Input.GetButtonDown("Pause")) { if (isPaused) { ClosePauseMenu(); } else { OpenPauseMenu(); } } }