示例#1
0
    public void StepStats(int step)
    {
        if (statsList != null)
        {
            gameAudioManager.PlayCardFlip();

            Statistics playerStats = GetPlayerStats();

            if (step >= 0)
            {
                if (playerStats.StatisticsList.Count >= statsIndex + step)
                {
                    statsIndex += step;
                    ShowStatsContainer(true);
                }
                else
                {
                    EndStats(true);
                }
            }
            else
            {
                if (0 <= statsIndex + step)
                {
                    statsIndex += step;
                    ShowStatsContainer(true);
                }
                else
                {
                    EndStats(false);
                }
            }
        }
    }
示例#2
0
    IEnumerator NewRoundWithDelay()
    {
        cardInDelay = true;
        float totalDelay = SettingsUtil.GetCardDelay();

        roundSeperator.SetActive(totalDelay > MIN_ROUND_DELAY_TO_DISPLAY_ROUND_SEP);

        delayValue.text = "3";
        yield return(new WaitForSeconds(totalDelay / 3));

        delayValue.text = "2";
        yield return(new WaitForSeconds(totalDelay / 3));

        delayValue.text = "1";
        yield return(new WaitForSeconds(totalDelay / 3));

        roundSeperator.SetActive(false);

        if (totalDelay > MIN_ROUND_DELAY_TO_DISPLAY_ROUND_SEP)
        {
            gameAudioManager.PlayCardFlip();
        }
        NewRound();
        cardInDelay = false;
    }