Beispiel #1
0
    public void OnClickAddRemoveButton(bool add)
    {
        // Check inputNumbers is not null
        bool isNull = true;

        for (int i = 0; i < inputNumbers.Length; i++)
        {
            if (inputNumbers[i] != NULL_FOR_INPUTNUMBER)
            {
                isNull = false;
                break;
            }
        }
        if (isNull)
        {
            return;
        }

        // Get input number as int
        int input = ChangeFromNumbersToInt();

        // Add or remove score
        Statics.AddOrRemoveScore(input, add);
        // Call and move main scene
        SceneManager.LoadScene("Main");
    }