コード例 #1
0
    //Use our current star levels to light up stars, buttons.
    public void CheckStars(QuizButton a_button)
    {
        if (!list)
        {
            list = FindObjectOfType <equipmentList>();
        }
        if ((int)a_button.Operator > (int)classType.Calculi)
        {
            currentSubject = classType.Calculi;
        }
        else
        {
            currentSubject = (classType)a_button.Operator;
        }


        SetupGroups((int)currentSubject);

        starsUnlocked = list.equip.StarsAcquired[(((int)currentSubject * 10) + currentLevel)];
        if (currentLevel == 4 || currentLevel == 9 || currentLevel == 14)
        {
            SetHardMode(false);

            medal.gameObject.SetActive(true);

            medal.SetChangingTalisman(list, talismanManager, currentSubject);

            BossButton.gameObject.SetActive(true);
            NormalMode.gameObject.SetActive(false);
            HardButton.gameObject.SetActive(false);
            starOne.gameObject.SetActive(false);
            starTwo.gameObject.SetActive(false);
            starThree.gameObject.SetActive(false);
            bronzestarParticle.gameObject.SetActive(false);
            silverstarParticle.gameObject.SetActive(false);
            goldstarParticle.gameObject.SetActive(false);
            return;
        }
        NormalMode.gameObject.SetActive(true);
        BossButton.gameObject.SetActive(false);
        medal.gameObject.SetActive(false);
        HardButton.gameObject.SetActive(true);
        starOne.gameObject.SetActive(true);
        starTwo.gameObject.SetActive(true);
        starThree.gameObject.SetActive(true);
        starOne.interactable    = (starsUnlocked >= 1);
        starTwo.interactable    = (starsUnlocked >= 2);
        HardButton.interactable = ((starsUnlocked >= 2) && currentContainer.buttons[currentLevel].hardMode != null);

        starThree.interactable = (starsUnlocked >= 3);
        bronzestarParticle.SetActive(starOne.interactable);
        silverstarParticle.SetActive(starTwo.interactable);
        goldstarParticle.SetActive(starThree.interactable);
    }