예제 #1
0
 public void CheckTask()
 {
     Debug.Log((ipNewDecValue % 256).ToString("X") + " " + memoryScrollViewController.GetInput());
     if ((ipNewDecValue % 256).ToString("X") == memoryScrollViewController.GetInput())
     {
         memoryScrollViewController.SetInputColor(true);
         userInformationLightController.addTaskDoneRight();
     }
     else
     {
         memoryScrollViewController.SetInputColor(false);
     }
 }
    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();
            }
        }
    }
예제 #3
0
    public void ResetLightsAddition()
    {
        int sum = lightsFirstLine.GetComponent <LightsController>().LightsValue + lightsSecondLine.GetComponent <LightsController>().LightsValue;

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

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

        StopAllCoroutines();
        userInformationLightController.addTaskDone();

        lightsFirstLine.GetComponent <LightsController>().InitLights();
        lightsSecondLine.GetComponent <LightsController>().InitLights();
        lightsResult.GetComponent <LightsController>().ResetLights();
        lightsUserInput.GetComponent <LightsController>().ResetLights();
    }
    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>().CalculateLightsValue() == lightsUserInput.GetComponent <LightsController>().CalculateLightsValue())
            {
                userInformationLightController.addTaskDoneRight();
            }
        }
    }