public override void Init()
        {
            if (IsInit)
                return;
            IsInit = true;

            Paramater = GetComponent<ButtonParamater>();
            Button = GetComponent<Button>();

            IsPressedBinding.Filters = BindingFilter.Properties;
            IsPressedBinding.FilterTypes = new[] { typeof(bool) };

            EnabledBinding.Action = UpdateState;
            EnabledBinding.Filters = BindingFilter.Properties;
            EnabledBinding.FilterTypes = new[] { typeof(bool) };
        }
        public override void Init()
        {
            if (IsInit)
                return;

            IsInit = true;

            // Grab dependencies
            Paramater = GetComponent<ButtonParamater>();
            Button = GetComponent<Button>();

            // Listen to button clicks
            Button.onClick.AddListener(Call);

            // Handle the Model.Enabled Change
            EnabledBinding.Action = UpdateState;
        }
Exemple #3
0
        public override void Init()
        {
            if (IsInit)
            {
                return;
            }
            IsInit = true;

            Paramater = GetComponent <ButtonParamater>();
            Button    = GetComponent <Button>();

            IsPressedBinding.Filters     = BindingFilter.Properties;
            IsPressedBinding.FilterTypes = new[] { typeof(bool) };

            EnabledBinding.Action      = UpdateState;
            EnabledBinding.Filters     = BindingFilter.Properties;
            EnabledBinding.FilterTypes = new[] { typeof(bool) };
        }
Exemple #4
0
        public override void Init()
        {
            if (IsInit)
            {
                return;
            }

            IsInit = true;

            // Grab dependencies
            Paramater = GetComponent <ButtonParamater>();
            Button    = GetComponent <Button>();

            // Listen to button clicks
            Button.onClick.AddListener(Call);

            // Handle the Model.Enabled Change
            EnabledBinding.Action = UpdateState;
        }
Exemple #5
0
        public override void Init()
        {
            if (IsInit)
            {
                return;
            }
            IsInit = true;

            Paramater = GetComponent <ButtonParamater>();
            Button    = GetComponent <Button>();

            OnClickBinding.Filters = BindingFilter.Commands;

            EnabledBinding.Action      = UpdateState;
            EnabledBinding.Filters     = BindingFilter.Properties;
            EnabledBinding.FilterTypes = new[] { typeof(bool) };

            Button.onClick.AddListener(Call);
        }