コード例 #1
0
 public static void SubLeafs(AnswerLeafs answerLeafs, ValueLeafs valueLeafs)
 {
     for (int i = 0; i < 4; i++)
     {
         answerLeafs.nums[i] -= valueLeafs.nums[i];
     }
 }
コード例 #2
0
 public void AddValue(ValueLeafs myLeafs)
 {
     AddLeafs(this, myLeafs);
     myLeafs.SetActive(false);
     GameManager.Instance.Check();
     DisplayNumbers();
     history.Push(myLeafs);
 }
コード例 #3
0
 public void SubValue()
 {
     if (history.Count > 0)
     {
         ValueLeafs valueleafs = history.Pop();
         SubLeafs(this, valueleafs);
         valueleafs.SetActive(true);
         DisplayNumbers();
     }
 }
コード例 #4
0
 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();
 }