예제 #1
0
    private void Update()
    {
        float currentAmount = ResourcesMaster.GetResourceAmount(displayedResource);

        if (currentAmount != lastDisplayedAmount)
        {
            lastDisplayedAmount = currentAmount;
            UpdatePurpleLiquidScale();
        }
    }
예제 #2
0
    private void Update()
    {
        float currentAmount = ResourcesMaster.GetResourceAmount(displayedResource);

        if (currentAmount != lastDisplayedAmount)
        {
            lastDisplayedAmount = currentAmount;
            CreateNewBottles();
        }
    }
예제 #3
0
    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();
            }
        }
    }