Esempio n. 1
0
    public void Test(GameObject obj, RuleVeredict veredict)
    {
        ButtonColor color = obj.GetComponent <ButtonColor>();

        if (color)
        {
            if (color.GetAdj() == colorAdj)
            {
                veredict.AddScore(-1);
                veredict.AddFailureReason("Did not ignore button that should be ignored");
            }
        }
    }
Esempio n. 2
0
    public void Test(GameObject obj, RuleVeredict veredict)
    {
        DateTime time = GameController.Instance.GetCurrentTime();

        ButtonColor color = obj.GetComponent <ButtonColor>();

        if (color && color.GetAdj() == colorAdj)
        {
            if (PressedTimeTranslator.TimeSatisfies(time, timeAdj))
            {
                veredict.AddScore(1);
            }
            else
            {
                veredict.AddScore(-1);
                veredict.AddFailureReason("Pressed button at wrong time of day");
            }
        }
    }