Exemple #1
0
    // Update is called once per frame
    void Update()
    {
        TimeRemaining -= Time.deltaTime;
        float minutes = Mathf.FloorToInt(TimeRemaining / 60);
        float seconds = Mathf.FloorToInt(TimeRemaining % 60);

        TimerText.text = "Time Remaining: " + minutes + ":" + seconds;
        time          += Time.deltaTime;

        Points.text = "Points: " + Mathf.Round(score);

        if (time >= TimeLimit)
        {
            ShuffleNumbers();
            //ShuffleSigns();
            time       = 0;
            TimeLimit -= 0.075f;
        }
        for (int i = 0; i < dropdowns.Length; i++)
        {
            if (awnser[i] == dropdownValues[i] && TimeRemaining > 0)
            {
                Debug.Log("Yes");
                score += 1f / 60f;
            }
            else
            {
                Debug.Log("No");
                //if (scoreMultiplier > 0)
                //{
                //    scoreMultiplier -= 1;
                //}
            }
        }
        //Debug.Log(operaterDropdownValue[0]);
        Debug.Log(dropdownValues[2]);
        Debug.Log(awnser[2]);
        if (TimeRemaining <= 0.0f)
        {
            TimerText.gameObject.SetActive(false);
            ResultScreen.SetActive(true);
            Points.gameObject.SetActive(false);
            if (score < 50)
            {
                OK.SetActive(true);
            }
            else if (score > 150)
            {
                Great.SetActive(true);
            }
            else
            {
                Good.SetActive(true);
            }
        }
    }
    // Update is called once per frame
    void Update()
    {
        if (counter == Arrows)
        {
            ComboText.gameObject.SetActive(false);
            DancingPlayer.SetActive(false);
            ResultScreen.SetActive(true);

            if (combo < 50)
            {
                OK.SetActive(true);
            }
            else if (combo > 100)
            {
                Great.SetActive(true);
            }
            else
            {
                Good.SetActive(true);
            }
        }
        ComboText.text = "Combo: " + combo;
    }