Пример #1
0
 public void AddButtonClick()
 {
     equals.add = true;
     print(Entry1.numberEntry.text);
     EntryList.AddToList(float.Parse(Entry1.numberEntry.text));
     thisButton.interactable          = false;
     Entry2.numberEntry2.interactable = true;
 }
Пример #2
0
    public void OnClick()
    {
        EntryList.AddToList(float.Parse(Entry2.numberEntry2.text));

        if (add)
        {
            //print("Add");
            sum = EntryList.myHoldList[0] + EntryList.myHoldList[1];
            print(sum);
            mySolDisplay.Solution.text = sum.ToString();
            AnswerCheck();
            ResetEntries();
            Win();
            add = false;
        }
        if (subtract)
        {
            //print("subtract");
            diff = EntryList.myHoldList[0] - EntryList.myHoldList[1];
            print(diff);
            mySolDisplay.Solution.text = diff.ToString();
            AnswerCheck();
            ResetEntries();
            Win();
            subtract = false;
        }
        if (multiply)
        {
            //print("multiply");
            prod = EntryList.myHoldList[0] * EntryList.myHoldList[1];
            print(prod);
            mySolDisplay.Solution.text = prod.ToString();
            AnswerCheck();
            ResetEntries();
            Win();
            multiply = false;
        }
        if (divide)
        {
            //print("divide");
            quot = EntryList.myHoldList[0] / EntryList.myHoldList[1];
            print(quot);
            mySolDisplay.Solution.text = quot.ToString();
            AnswerCheck();
            ResetEntries();
            Win();
            divide = false;
        }
    }
Пример #3
0
    public void AddButtonClick()
    {
        //sum = EntryList.myHoldList[0] + EntryList.myHoldList[1];

        //print("The sum is " + sum);

        //MySolDisplay.Solution.text = sum.ToString();

        //Set interactable to false
        EntryList.AddToList(float.Parse(Entry1.numberEntry.text));
        thisButton.interactable          = false;
        Entry2.numberEntry2.interactable = true;

        //firstEnemy.ValueCheck();
    }