Пример #1
0
        public override void Close(UIFrameDBEntry frameDBEntry)
        {
            var frames = currentFrames.Where(f => f.GetComponent <DBEntryResource>().parent == frameDBEntry).ToList();

            _currentFrames.RemoveAll(f => frames.Contains(f));
            frames.ForEach(f => Destroy(f.gameObject));
        }
Пример #2
0
 public override void Close(UIFrameDBEntry frameDBEntry)
 {
     if (_currentFrameDBEntry == frameDBEntry)
     {
         Destroy(_currentFrame.gameObject);
         _currentFrameDBEntry = null;
     }
 }
Пример #3
0
        protected UIFrame ShowFrame(UIFrameDBEntry frameItem, params object[] args)
        {
            var frame = frameItem.LoadFrame().Clone(rectTransform);

            frame.Show(this, args);
            frame.rectTransform.Stretch();

            return(frame);
        }
Пример #4
0
        public override void Show(UIFrameDBEntry frame, params object[] args)
        {
            if (_currentFrameDBEntry == frame)
            {
                return;
            }
            var prevFrame = _currentFrame;

            _currentFrameDBEntry = frame;
            _currentFrame        = ShowFrame(frame, args);
            if (prevFrame != null)
            {
                Destroy(prevFrame.gameObject);
            }
        }
Пример #5
0
        protected UIFrame ShowFrame(UIFrameDBEntry frameItem, params object[] args)
        {
            var frame = frameItem.LoadFrame().Clone(rectTransform);

            frame.Show(this);
            frame.rectTransform.Stretch();

            if (args != null && args.Length > 0)
            {
                frame.SendMessage("OnShowParams", args, SendMessageOptions.DontRequireReceiver);
            }
            else
            {
                frame.SendMessage("OnShow", SendMessageOptions.DontRequireReceiver);
            }
            return(frame);
        }
Пример #6
0
        public void Show(UIFrameDBEntry newFrame, params object[] args)
        {
            var requiredLayer = GetOrCreateLayer(newFrame.layer);

            requiredLayer.Show(newFrame, args);
        }
Пример #7
0
 public void Show(UIFrameDBEntry newFrame)
 {
     Show(newFrame, null);
 }
Пример #8
0
 public override void Show(UIFrameDBEntry frameDBEntry, params object[] args)
 {
     _currentFrames.Add(ShowFrame(frameDBEntry, args));
 }
Пример #9
0
 public abstract void Close(UIFrameDBEntry frameDBEntry);
Пример #10
0
 public abstract void Show(UIFrameDBEntry frame, params object[] args);