示例#1
0
    private void OnCheck()
    {
        PlayClickSound();

        if (m_QuestionBox.IsCorrect())
        {
            m_ConsoleText.text  = "Correct!";
            m_ConsoleText.color = CC_GREEN;

            m_NextButton.interactable  = true;
            m_CheckButton.interactable = false;
            m_ResetButton.interactable = false;

            foreach (DraggableObject dobj in m_DraggableObjects)
            {
                dobj.EnableDragging(false);
            }

            // Award points
            ChangePoints(m_CurrentQuestionPoints);
        }
        else
        {
            m_ConsoleText.text  = "Incorrect!";
            m_ConsoleText.color = CC_RED;

            // Cut points reward in half
            m_CurrentQuestionPoints /= 2;
        }
    }