public static void SubLeafs(AnswerLeafs answerLeafs, ValueLeafs valueLeafs) { for (int i = 0; i < 4; i++) { answerLeafs.nums[i] -= valueLeafs.nums[i]; } }
public void AddValue(ValueLeafs myLeafs) { AddLeafs(this, myLeafs); myLeafs.SetActive(false); GameManager.Instance.Check(); DisplayNumbers(); history.Push(myLeafs); }
public void SubValue() { if (history.Count > 0) { ValueLeafs valueleafs = history.Pop(); SubLeafs(this, valueleafs); valueleafs.SetActive(true); DisplayNumbers(); } }
public void Restart() { while (history.Count > 0) { ValueLeafs valueleafs = history.Pop(); valueleafs.SetActive(true); } for (int i = 0; i < 4; i++) { nums[i] = 0; } DisplayNumbers(); }