예제 #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));
        }
 public override void Close(UIFrameDBEntry frameDBEntry)
 {
     if (_currentFrameDBEntry == frameDBEntry)
     {
         Destroy(_currentFrame.gameObject);
         _currentFrameDBEntry = null;
     }
 }
        protected UIFrame ShowFrame(UIFrameDBEntry frameItem, params object[] args)
        {
            var frame = frameItem.LoadFrame().Clone(rectTransform);

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

            return(frame);
        }
        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
        public void Show(UIFrameDBEntry newFrame, params object[] args)
        {
            var requiredLayer = GetOrCreateLayer(newFrame.layer);

            requiredLayer.Show(newFrame, args);
        }
예제 #6
0
 public void Show(UIFrameDBEntry newFrame)
 {
     Show(newFrame, null);
 }
 public abstract void Close(UIFrameDBEntry frameDBEntry);
 public abstract void Show(UIFrameDBEntry frame, params object[] args);
 public static void Show(this UIFrameDBEntry frameDBEntry, params object[] args)
 {
     Modules.Get <UI>().Show(frameDBEntry, args);
 }
 public static UIFrame LoadFrame(this UIFrameDBEntry frameDBEntry)
 {
     return(frameDBEntry.LoadPrefab <UIFrame>());
 }
예제 #11
0
 public override void Show(UIFrameDBEntry frameDBEntry, params object[] args)
 {
     _currentFrames.Add(ShowFrame(frameDBEntry, args));
 }