Esempio n. 1
0
        private void CheckForBindableForm(bool force_bind_to_form = false)
        {
            if (!force_bind_to_form)
            {
                if (binded_form != null)
                {
                    return;
                }

                if (!bind_automatically)
                {
                    return;
                }
            }

            if (binded_form == null)
            {
                BindableForm bindable_form = gameObject.GetComponentInParent <BindableForm>();

                binded_form = bindable_form;

                if (bindable_form == null)
                {
                    return;
                }
            }

            Bind(binded_form);
        }
Esempio n. 2
0
        private void Unbind()
        {
            if (binded_form == null)
            {
                return;
            }

            binded_form.RemoveBinding(this);

            binded_form = null;
        }
Esempio n. 3
0
        private void Bind(BindableForm binded_form)
        {
            if (binded_form == null)
            {
                return;
            }

            this.binded_form = binded_form;

            binded_form.AddBinding(this);
        }