Ejemplo n.º 1
0
    void Update()
    {
        UICont.UpdateInfo();

        if (currLevel == null || levelCompleted == true)
        {
            return;
        }

        if (levelStarted == true && levelPaused == false)
        {
            timePassed += Time.deltaTime;
        }

        if (showingAllCards == true)
        {
            if (DataTransfer.remainingTime - Time.deltaTime * timeFlowFactor <= 0f)
            {
                DataTransfer.remainingTime = 0f;
                RestoreCards();
            }
            else
            {
                DataTransfer.remainingTime -= Time.deltaTime * timeFlowFactor;
            }
        }

        if ((levelMode == LevelMode.NO_MISTAKE && levelFinished == true) ||
            nextNumber > currLevel.totalCardCount)
        {
            nextNumber--;
            levelCompleted = true;
            StartCoroutine(ExecuteAfterTime(1.0f, changeSuccedScreenMethod));
        }
    }