Exemplo n.º 1
0
		public void AddToBack (BasePopupView popup)
		{
			lock (mutex)
			{
				list.Add(popup);
			}
		}
Exemplo n.º 2
0
		public void AddToFront (BasePopupView popup)
		{
			lock (mutex)
			{
				list.Insert(0, popup);
			}
		}
Exemplo n.º 3
0
		protected virtual IEnumerator AnimationEnds(BasePopupView popupView, float duration)
		{
			yield return new WaitForSeconds(duration);
			setPlayingState(false);

			if (OnAnimationEnds != null && popupView != null) 
				OnAnimationEnds(popupView, endParam);
		}
Exemplo n.º 4
0
		public virtual void StartAnimation (BasePopupView popupView, float duration, bool reverse = false)
		{
			this.reverse = reverse;

			setPlayingState(true);

			popupView.StopAllCoroutines();
			popupView.StartCoroutine(AnimationEnds(popupView, duration));

		}
Exemplo n.º 5
0
		public override void ExecuteHide (BasePopupView view, object param = null)
		{
			if (blackMaskStack.Count > 0)
			{
				int lastIndex = blackMaskStack.Count - 1;
				Transform blackMaskTransform = blackMaskStack[lastIndex];
				UIEventListener.Get(blackMaskTransform.gameObject).onClick = null;
				blackMaskStack.RemoveAt(lastIndex);
				ResourceManager.Instance.RecycleAsset(blackMaskTransform.gameObject);
			}
		}
Exemplo n.º 6
0
		public override void StartAnimation (BasePopupView popupView, float duration, bool reverse = false)
		{
			base.StartAnimation (popupView, duration, reverse);

			if (!reverse)
			{
				popupView.transform.localScale = Vector3.one * ORIGIN_SCALE;
				TweenScale.Begin(popupView.gameObject, duration, Vector3.one);
			}
			else
			{
				popupView.transform.localScale = Vector3.one;
				TweenScale.Begin(popupView.gameObject, duration, Vector3.one * ORIGIN_SCALE);
			}

		}
Exemplo n.º 7
0
		public override void ExecuteShow (BasePopupView view, object param = null)
		{
			if (param != null)
			{
				AddMaskDTO dto = (AddMaskDTO)param;
				
				currentPopup = view;
				
				Transform popParent = dto.popupRoot;
				
				Transform blackMaskTransform = ResourceManager.Instance.LoadGameObject(ObjectType.GameObject, PopupConst.MASK_PATH).transform;
				blackMaskTransform.parent = popParent;
				blackMaskTransform.localScale = Vector3.one;
				blackMaskTransform.localPosition = Vector3.zero;
				blackMaskStack.Add(blackMaskTransform);
				blackMaskTransform.GetComponent<UIPanel>().depth = dto.depth - Z_MASK_INCREMENT;
				
				if (dto.clickHide)
					UIEventListener.Get(blackMaskTransform.gameObject).onClick = onBlackMaskClick;
			}
		}
Exemplo n.º 8
0
		public override void StartAnimation (BasePopupView popupView, float duration, bool reverse = false)
		{
			base.StartAnimation (popupView, duration, reverse);

			if (!reverse)
			{
	//			popupView.transform.localPosition = new Vector3(0, ORIGIN_Y, 0);
	//			TweenPosition.Begin(popupView.gameObject, duration, Vector3.zero);

                popupView.Group.alpha = ORIGIN_ALPHA;
//				TweenAlpha.Begin(popupView.gameObject, duration, 1f);
			}
			else
			{
	//			popupView.transform.localPosition = Vector3.zero;
	//			TweenPosition.Begin(popupView.gameObject, duration, new Vector3(0, ORIGIN_Y, 0));

                popupView.Group.alpha = 1f;
//				TweenAlpha.Begin(popupView.gameObject, duration, ORIGIN_ALPHA);
			}

		}
Exemplo n.º 9
0
		private IEnumerator AutoRemovePopup(BasePopupView view, float autoRemoveDelay)
		{
			yield return new WaitForSeconds(autoRemoveDelay);
			
			popupManagerDelegate.RemovePopup(view, true);
		}
Exemplo n.º 10
0
		public override void ExecuteHide (BasePopupView view, object param)
		{
		}
Exemplo n.º 11
0
		public override void ExecuteShow (BasePopupView view, object param)
		{
			float autoRemoveDelay = (float)param;
			if (autoRemoveDelay > 0)
				view.StartCoroutine(AutoRemovePopup(view, autoRemoveDelay));
		}
Exemplo n.º 12
0
		public override void ExecuteHide (BasePopupView view, object param = null)
		{
//		ApplicationFacade.Instance.DispatchNotification(NotificationConst.SHOW_MAIN_CAMERA);
		}
Exemplo n.º 13
0
		/// <summary>
		/// 面板隐藏时的行为
		/// </summary>
		public abstract void ExecuteHide (BasePopupView view, object param);