public void Chain_of_Responsibility_Pattern_Test() { var first = new FirstStep(); var second = new SecondStep(); var third = new ThirdStep(); first.Next(second).Next(third); Assert.IsTrue((bool)first.Handler(NumberEnum.One)); Assert.IsTrue((bool)first.Handler(NumberEnum.Two)); Assert.IsTrue((bool)first.Handler(NumberEnum.Three)); Assert.IsNull(first.Handler(NumberEnum.Four)); }
public void GoToNextStep() { if (currentStep == 0) { FirstStep.SetActive(false); SecondStep.SetActive(true); currentStep++; } else if (currentStep == 1) { groupName = GroupNameText.GetComponent <TMPro.TextMeshProUGUI>().text.Trim(); SecondStep.SetActive(false); ThirdStep.SetActive(true); currentStep++; } }
static void Main(string[] args) { FirstStep.begin(); SecondStep.begin(); }