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;
        }
Exemplo n.º 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) };
        }
Exemplo n.º 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;
        }
Exemplo n.º 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);
        }