示例#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");
            }
        }
    }
    public void Test(GameObject obj, RuleVeredict veredict)
    {
        NameSource nameSrc = obj.GetComponent <NameSource>();

        if (nameSrc)
        {
            if (nameSrc.GetNameSource() == nameToIgnore)
            {
                veredict.AddScore(-1);
                veredict.AddFailureReason("You did not ignore message from " + nameToIgnore);
            }
        }
    }
示例#3
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");
            }
        }
    }