コード例 #1
0
        /*============================================================================*/
        /* Private Functions                                                          */
        /*============================================================================*/

        private void OnEnable()
        {
            if (start)
            {
                return;
            }

            start = true;

            mediatorAttach = target as MediatorAttach;
        }
コード例 #2
0
        private void RemoveMediatorAttach(object mediator, object view)
        {
            if (!_viewMediatorAttachDictionary.ContainsKey(view))
            {
                return;
            }

            MediatorAttach mediatorAttach = _viewMediatorAttachDictionary[view];

            mediatorAttach.RemoveMediator(mediator);

            if (mediatorAttach.Mediators.Length == 0)
            {
                GameObject.Destroy(mediatorAttach);
                _viewMediatorAttachDictionary.Remove(view);
            }
        }