Example #1
0
 public MixedLineScrollerPart(UIPart targetPart, MixedLineCellView mixedLineCellView)
     : base(mixedLineCellView.m_MixedLineScrollerView.transform)
 {
     m_TargetPart            = targetPart;
     m_MixedLineScrollerView = mixedLineCellView.m_MixedLineScrollerView;
     m_LaboScrollerView      = mixedLineCellView.m_LaboScrollerView;
 }
Example #2
0
 public BallScrollerPart(UIPart targetPart, BallCellView ballCellView)
     : base(ballCellView.m_MixedLineScrollerView.transform)
 {
     m_TargetPart       = targetPart;
     m_BallScrollerView = ballCellView.m_MixedLineScrollerView;
     m_HomeScrollerView = ballCellView.m_HomeScrollerView;
 }
 public ElementLineScrollerPart(UIPart targetPart, ElementLineCellView elementLineCellView)
     : base(elementLineCellView.m_ElementLineScrollerView.transform)
 {
     m_TargetPart = targetPart;
     m_ElementLineScrollerView = elementLineCellView.m_ElementLineScrollerView;
     m_LaboScrollerView        = elementLineCellView.m_LaboScrollerView;
 }
Example #4
0
        public void SetPart(UIBaseLayer layer, UIPart part)
        {
            int generation = GetGeneration(transform, part.RootTransform);

            if (m_Generation < generation)
            {
                return;
            }

            Layer        = layer;
            Part         = part;
            m_Generation = generation;
        }
Example #5
0
        public void SetUI(UIBaseLayer layer, UIPart ui)
        {
            int generation = GetGeneration(transform, ui.root);

            if (m_generation < generation)
            {
                return;
            }

            m_layer      = layer;
            m_ui         = ui;
            m_generation = generation;
        }
Example #6
0
		private void RunTouchEvents() {
			if (m_touchEvents.Count == 0) { return; }

			bool ret = false;
			int untouchableIndex = FindUntouchableIndex();

			Queue<TouchEvent> queue = new Queue<TouchEvent>(m_touchEvents);
			m_touchEvents.Clear();

			while (queue.Count > 0) {
				TouchEvent touch = queue.Dequeue();

				if (ret) { continue; }
				if (touch.listener.layer == null) { continue; }

				bool touchable = true;
				touchable = touchable && IsScreentouchable();
				touchable = touchable && touch.listener.layer.IsTouchable();
				touchable = touchable && untouchableIndex < touch.listener.layer.siblingIndex;
				if (!touchable) { continue; }

				UIPart ui = touch.listener.ui;
				switch (touch.type) {
					case TouchType.Click: {
						UIPart.SE se = new UIPart.SE();
						ret = ui.OnClick(touch.listener.gameObject.name, touch.listener.gameObject, touch.pointer, se);
						if (ret && m_implements.sounder != null) {
							if (!string.IsNullOrEmpty(se.playName)) {
								m_implements.sounder.PlayClickSE(se.playName);
							} else {
								m_implements.sounder.PlayDefaultClickSE();
							}
						}
						break;
					}
					case TouchType.Down: {
						ret = ui.OnTouchDown(touch.listener.gameObject.name, touch.listener.gameObject, touch.pointer);
						break;
					}
					case TouchType.Up: {
						ret = ui.OnTouchUp(touch.listener.gameObject.name, touch.listener.gameObject, touch.pointer);
						break;
					}
					case TouchType.Drag: {
						ret = ui.OnDrag(touch.listener.gameObject.name, touch.listener.gameObject, touch.pointer);
						break;
					}
					default: break;
				}
			}
		}
Example #7
0
        public virtual void Destroy()
        {
            UIController.Implements.PrefabLoader.Release(Part.PrefabPath, m_Prefab);
            m_Prefab = null;

            Part.Destroy();
            Part = null;

            foreach (UITouchListener item in m_Listeners)
            {
                item.ClearPart();
            }

            m_Listeners = null;
        }
Example #8
0
        public virtual void Destroy()
        {
            UIController.implements.prefabLoader.Release(m_ui.prefabPath, m_prefab);
            m_prefab = null;

            m_ui.Destroy();
            m_ui = null;


            for (int i = 0; i < m_listeners.Length; i++)
            {
                m_listeners[i].ResetUI();
            }
            m_listeners = null;
        }
Example #9
0
        // 新規セルビュー追加時デリゲート
        private void CellViewInstantiated(EnhancedScroller scroller, EnhancedScrollerCellView cellView)
        {
            UIPart part = null;

            switch (cellView.cellIdentifier)
            {
            case "ShopCellView":
                part = new ShopPart(cellView as ShopCellView);
                break;

            case "BallCellView":
                part = new BallPart(cellView as BallCellView, m_HomeScrollerView);
                break;

            case "BattleCellView":
                part = new BattlePart(cellView as BattleCellView);
                break;

            case "SocialCellView":
                part = new SocialPart(cellView as SocialCellView);
                break;

            case "EventCellView":
                part = new EventPart(cellView as EventCellView);
                break;

            default:
                Debug.LogError($"CellViewInstantiated Error cellIdentifier:{cellView.cellIdentifier}");
                return;
            }

            List <UIPart> parts = new List <UIPart>
            {
                part
            };

            // 即時追加
            UIController.Instance.AttachParts(this, parts);
        }
Example #10
0
        // 新規セルビュー追加時デリゲート
        private void CellViewInstantiated(EnhancedScroller scroller, EnhancedScrollerCellView cellView)
        {
            UIPart part = null;

            switch (cellView.cellIdentifier)
            {
            case "MixedListCellView":
                part = new MixedListPart(cellView as MixedListCellView);
                break;

            case "MixedLineCellView":
                part = new MixedLinePart(cellView as MixedLineCellView, m_LaboScrollerView);
                break;

            case "PreviewCellView":
                part = new PreviewPart(cellView as PreviewCellView);
                break;

            case "ElementLineCellView":
                part = new ElementLinePart(cellView as ElementLineCellView, m_LaboScrollerView, m_MixedBallTabBase.m_MixedBallTabView);
                break;

            case "ElementListCellView":
                part = new ElementListPart(cellView as ElementListCellView);
                break;

            default:
                Debug.LogError($"CellViewInstantiated Error cellIdentifier:{cellView.cellIdentifier}");
                return;
            }

            List <UIPart> parts = new List <UIPart>
            {
                part
            };

            // 即時追加
            UIController.Instance.AttachParts(this, parts);
        }
Example #11
0
 public UIBaseLayer(UIPart part, Transform parent) : base(part)
 {
     State    = EnumLayerState.None;
     m_Parent = parent;
     ProgressState(EnumLayerState.InFading);
 }
Example #12
0
 public UIPartContainer(UIPart part)
 {
     Part = part;
 }
Example #13
0
 public void ClearPart()
 {
     Layer        = null;
     Part         = null;
     m_Generation = int.MaxValue;
 }
Example #14
0
 public UIPartContainer(UIPart ui)
 {
     m_ui = ui;
 }
Example #15
0
 public void ResetUI()
 {
     m_layer      = null;
     m_ui         = null;
     m_generation = int.MaxValue;
 }