Exemple #1
0
    //called either when time is finished or when all the items are sold
    public void LevelFinished()
    {
        finished = true;
        //check if coin goal is met
        if (coinCount >= coinGoal)
        {
            DisplayWinMessage();
        }
        else
        {
            DisplayLooseMessage();
        }
        userControlls.SetInstructedToRestart(false);

        if (level > 2)
        {
            //Turn off speed slider, turn back time to 1
            speedSlider.value        = 1;
            speedSlider.interactable = false;
        }
        Moving camelMoving = camel.GetComponent <Moving>();

        //Don't let the user click the camel and stop the camel from moving
        camelMoving.SetClickable(false);
        camelMoving.StopMoving(false);
        camelMoving.TurnAllMusicOff();
        CancelInvoke();

        //Inventory is uninteractable when level finished
        inventoryManager.SetSwap(false);
    }
Exemple #2
0
    public IEnumerator <WaitForSeconds> TwoHoursLatar()
    {
        secondaryPanel.SetActive(false);
        yield return(new WaitForSeconds(6f));

        secondaryPanel.SetActive(true);
        buttonActive = false;
        secondaryPanel.transform.localPosition = secondaryPosition[textDisplayCount];
        secondaryText.text = textSecondary[textDisplayCount];
        textDisplayCount++;
        secondaryButton.SetActive(buttonActive);
        buttonActive = true;
        userControls.SetInstructedToRestart(true);
        GetBorder("InfoOutline").Highlight();
    }