示例#1
0
 public void IncreaseCurrentCount()
 {
     currentCount++;
     ChangeNoodleProgressText();
     if (currentCount == expectedCount)
     {
         if (bowlCards.Length == 0)
         {
             WinPreparation();
             return;
         }
         SelectNextCard();
         ChangeBowl();
         int prev = currentCard - 1;
         if ((currentCard - 1) == -1)
         {
             if (bowlCards.Length > 0)
             {
                 prev = bowlCards.Length - 1;
             }
             else
             {
                 prev = 0;
             }
         }
         BowlCards doneBowlCard = bowlCards[prev].GetComponent <BowlCards>();
         doneBowlCard.Done();
         PasteAndPlayClip(doneBowl);
         ChangeDelayAndChance(doneBowlCard.type);
         spawner.IncreaseSpawnpointsValue();
         cardsDone++;
         cm.speed++;
     }
 }
示例#2
0
    public void ChangeBowl()
    {
        if (cardsDone == bowlCards.Length)
        {
            return;
        }

        BowlCards bowlCardComponent = GetCurrentCard();

        while (bowlCardComponent.done)
        {
            SelectNextCard();
            bowlCardComponent = bowlCards[currentCard].GetComponent <BowlCards>();
        }
        bowlCardComponent.SwapBowl();
        changeBowlEffectIcons.Play();
        changeBowlEffectSmoke.Play();
        PasteAndPlayClip(changeBowlSound);
        if (bowlCards.Length > 1)
        {
            SelectNextCard();
        }
    }
示例#3
0
    private void CalculateProgressResult()
    {
        int totalProgressCount = 0;

        foreach (GameObject bowlcard in bowlCards)
        {
            BowlCards bc = bowlcard.GetComponent <BowlCards>();
            totalProgressCount += bc.expectedCount;
        }
        Bowl currentBowl = GameObject.FindGameObjectWithTag("Bowl").GetComponent <Bowl>();

        totalProgressCount += currentBowl.expectedProgress;
        float maxScore = totalProgressCount * correctNoodleValue;

        float firstGradeMistake = maxScore * (mistake / 100);
        float threeStars        = maxScore - firstGradeMistake;
        float twoStars          = maxScore - firstGradeMistake * 2;
        float oneStars          = maxScore - firstGradeMistake * 3;

        if (score <= maxScore && score >= threeStars)
        {
            starsPerLvl = 3;
            allStarsEffect.Play();
        }
        else if (score >= twoStars && score <= threeStars)
        {
            starsPerLvl = 2;
        }
        else if (score >= oneStars && score <= twoStars)
        {
            starsPerLvl = 1;
        }
        else if (score <= oneStars)
        {
            starsPerLvl = 0;
        }
    }