示例#1
0
        void Reset()
        {
            var context = gameObject.GetComponentInParent(typeof(DataContext)) as DataContext;

            if (context != null)
            {
                _viewModel = new INPCBinding.ComponentPath {
                    Component = context
                }
            }
            ;

            _view = gameObject.GetComponent <UIBehaviour>();
        }

        void Awake()
        {
            FigureBindings();
        }

        void OnDestroy()
        {
            ClearBindings();
        }
示例#2
0
        void Reset()
        {
            var context = gameObject.GetComponentInParent(typeof(DataContext)) as DataContext;
            if (context != null)
                _viewModel = new INPCBinding.ComponentPath { Component = context };

            _view = gameObject.GetComponent<UIBehaviour>();
        }