public void CheckResults()
    {
        lightsFirstLine.GetComponent <LightsController>().InitLightsWithMistakes(firstNumber);
        lightsSecondLine.GetComponent <LightsController>().InitLightsWithMistakes(secondNumber);
        lightsResult.GetComponent <LightsController>().InitLightsWithMistakes(linesSum);
        this.SetSFFlags();


        if (!userInformationLightController.timeIsOver())
        {
            userInformationLightController.addTaskDone();

            if (!this.AnswerHasMistakes())
            {
                userInformationLightController.addTaskDoneRight();
            }
        }
    }
예제 #2
0
    public void CheckResults()
    {
        int sum = lightsFirstLine.GetComponent <LightsController>().LightsValue + lightsSecondLine.GetComponent <LightsController>().LightsValue;

        lightsResult.GetComponent <LightsController>().ShowLightsResult(sum, lightsResultIndicator, lightsFirstLine, lightsSecondLine, lightsUserInput);

        if (!userInformationLightController.timeIsOver())
        {
            //userInformationLightController.addTaskDone();

            // Debug.Log(lightsResult.GetComponent<LightsController>().CalculateLightsValue());
            // Debug.Log(lightsUserInput.GetComponent<LightsController>().CalculateLightsValue());
            // Debug.Log(lightsFirstLine.GetComponent<LightsController>().CalculateLightsValue());
            // Debug.Log(lightsSecondLine.GetComponent<LightsController>().CalculateLightsValue());

            /*   if (lightsResult.GetComponent<LightsController>().isAnswerCorrect)
             *     userInformationLightController.addTaskDoneRight();*/
        }
    }