예제 #1
0
    internal void ready()
    {
        if (parent == null)
        {
            parent = FindObjectOfType <MonsterManager>();
        }
        button    = parent.quizRunning;
        container = button.parent;

        if (!combatState)
        {
            combatState = FindObjectOfType <CombatStateManager>();
        }


        if (button.Operator > operators.Division)
        {
            if (!combatState.CanContinueFort(button.quizIndex + 1))
            {
                gameObject.SetActive(false);
                return;
            }
        }


        if (!button.Hard && button.quizIndex < (container.buttons.Length - 1))
        {
            gameObject.SetActive(true);
        }
        else
        {
            gameObject.SetActive(false);
        }
    }
    //Open up the script by setting up variables relative to selection.
    public void setContainer(questionContainer op)
    {
        currentContainer = op;
        currentSubject   = op.type;

        currentLevel = 0;
        gameObject.SetActive(true);
        CheckStars(op.buttons[0]);
        op.gameObject.SetActive(false);

        SetButtons();

        ChangeIndex(currentLevel);
    }
    void awakenSubject(GameObject subject)
    {
        questionContainer sub = subject.GetComponent <questionContainer>();

        sub.Awaken();
    }