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); } } }
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"); } } }