コード例 #1
0
ファイル: L4A255_input.cs プロジェクト: malombra96/Educar
    void Awake()
    {
        _isEmpty   = true;
        _isEnabled = true;
        _isRight   = false;

        _L4A255_managerInput = FindObjectOfType <L4A255_managerInput>();

        _input = GetComponent <InputField>();

        if (_isMath)
        {
            _input.contentType = InputField.ContentType.Standard;
            _input.onValueChanged.AddListener(delegate { SetStateEmpty(_input.text); });
            _input.onEndEdit.AddListener(delegate { SetOperationMath(_input.text); });
        }
        else
        {
            _input.onValueChanged.AddListener(delegate { SetEmptyStandard(_input.text); });
        }

        if (Application.isMobilePlatform)
        {
            _input.contentType = InputField.ContentType.Standard;
        }
    }
コード例 #2
0
    void Awake()
    {
        _L4A255_managerInput = FindObjectOfType <L4A255_managerInput>();
        _L4A255_managerInput._groupInputField.Add(this);

        for (int i = 0; i < transform.childCount; i++)
        {
            if (transform.GetChild(i).GetComponent <InputField>())
            {
                _inputFields.Add(transform.GetChild(i).GetComponent <InputField>());
            }
        }
    }