Exemplo n.º 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));
        }
Exemplo n.º 2
0
 public override void Close(UIFrameDBEntry frameDBEntry)
 {
     if (_currentFrameDBEntry == frameDBEntry)
     {
         Destroy(_currentFrame.gameObject);
         _currentFrameDBEntry = null;
     }
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
        }
Exemplo n.º 6
0
        public void Show(UIFrameDBEntry newFrame, params object[] args)
        {
            var requiredLayer = GetOrCreateLayer(newFrame.layer);

            requiredLayer.Show(newFrame, args);
        }
Exemplo n.º 7
0
 public void Show(UIFrameDBEntry newFrame)
 {
     Show(newFrame, null);
 }
Exemplo n.º 8
0
 public override void Show(UIFrameDBEntry frameDBEntry, params object[] args)
 {
     _currentFrames.Add(ShowFrame(frameDBEntry, args));
 }
Exemplo n.º 9
0
 public abstract void Close(UIFrameDBEntry frameDBEntry);
Exemplo n.º 10
0
 public abstract void Show(UIFrameDBEntry frame, params object[] args);