コード例 #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;
 }
コード例 #2
0
ファイル: BallScrollerPart.cs プロジェクト: ishidafuu/dmui
 public BallScrollerPart(UIPart targetPart, BallCellView ballCellView)
     : base(ballCellView.m_MixedLineScrollerView.transform)
 {
     m_TargetPart       = targetPart;
     m_BallScrollerView = ballCellView.m_MixedLineScrollerView;
     m_HomeScrollerView = ballCellView.m_HomeScrollerView;
 }
コード例 #3
0
 public ElementLineScrollerPart(UIPart targetPart, ElementLineCellView elementLineCellView)
     : base(elementLineCellView.m_ElementLineScrollerView.transform)
 {
     m_TargetPart = targetPart;
     m_ElementLineScrollerView = elementLineCellView.m_ElementLineScrollerView;
     m_LaboScrollerView        = elementLineCellView.m_LaboScrollerView;
 }
コード例 #4
0
ファイル: UITouchListener.cs プロジェクト: ishidafuu/dmui
        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;
        }
コード例 #5
0
ファイル: UITouchListener.cs プロジェクト: seipan1213/Sechar
        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;
        }
コード例 #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;
				}
			}
		}
コード例 #7
0
ファイル: UIPartContainer.cs プロジェクト: ishidafuu/dmui
        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;
        }
コード例 #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;
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #11
0
 public UIBaseLayer(UIPart part, Transform parent) : base(part)
 {
     State    = EnumLayerState.None;
     m_Parent = parent;
     ProgressState(EnumLayerState.InFading);
 }
コード例 #12
0
ファイル: UIPartContainer.cs プロジェクト: ishidafuu/dmui
 public UIPartContainer(UIPart part)
 {
     Part = part;
 }
コード例 #13
0
ファイル: UITouchListener.cs プロジェクト: ishidafuu/dmui
 public void ClearPart()
 {
     Layer        = null;
     Part         = null;
     m_Generation = int.MaxValue;
 }
コード例 #14
0
 public UIPartContainer(UIPart ui)
 {
     m_ui = ui;
 }
コード例 #15
0
ファイル: UITouchListener.cs プロジェクト: seipan1213/Sechar
 public void ResetUI()
 {
     m_layer      = null;
     m_ui         = null;
     m_generation = int.MaxValue;
 }