コード例 #1
0
    public bool CheckEquationAnswer(int index, int guess)
    {
        if (index != currentEquationIndex)
        {
            return(false);
        }

        if (guess == currentEquation.answer)
        {
            Skill skill = SkillDataBase.GetSkill(currentEquation.type, currentEquation.answer);
            skill.AddProgress(ProfileManager.currentProfileIndex, .1f);
            currentEquation.status = Equation.Status.Correct;

            return(true);
        }
        else
        {
            Debug.Log("Wrong Answer");
            currentEquation.status = Equation.Status.Incorrect;
            //NextEquation ();
            return(false);
        }
    }