private void ItemsTweenScaleFadeIn() { ceilIndex++; Transform curChild = gridTran.GetChild(ceilIndex); UIWidget wdgt = curChild.gameObject.GetComponent <UIWidget>(); curChild.gameObject.SetActive(true); if (wdgt != null) { wdgt.alpha = 0.001f; wdgt.transform.localScale = new Vector3(1f, 0.0f, 1f); TweenAlpha ta = TweenAlpha.Begin(curChild.gameObject, this.tweenDuration, 1f); TweenScale ts = TweenScale.Begin(curChild.gameObject, this.tweenDuration, new Vector3(1, 1, 1)); } if (ceilIndex < gridTran.childCount - 1) { StartCoroutine(DelayCallFun.DoDelay(() => { ItemsTweenScaleFadeIn(); }, this.ceilTweenInterval)); } }
private void ItemsTweenStep2() { for (int idx = 0; idx < ceilIndex + 1; idx++) { Transform oneChild = gridTran.GetChild(idx); TweenPosition tp2 = TweenPosition.Begin(oneChild.gameObject, this.tweenDuration, new Vector3(oneChild.localPosition.x + gridTran.gameObject.GetComponent <UIGrid>().cellWidth, oneChild.localPosition.y, oneChild.localPosition.z)); } StartCoroutine(DelayCallFun.DoDelay(() => { ItemsTweenStep1(); }, this.tweenDuration)); }
private void ItemsRowMove() { for (int idx = 0; idx < childIndex + 1; idx++) { Transform oneChild = gridTran.GetChild(idx); TweenPosition tp2 = TweenPosition.Begin(oneChild.gameObject, 0.2f, new Vector3(oneChild.localPosition.x + gridTran.gameObject.GetComponent <UIGrid>().cellWidth, oneChild.localPosition.y, oneChild.localPosition.z)); } StartCoroutine(DelayCallFun.DoDelay(() => { ItemsMove(); }, 0.2f)); }
private void ItemsMove() { childIndex++; Transform curChild = gridTran.GetChild(childIndex); curChild.gameObject.SetActive(true); TweenPosition tp1 = TweenPosition.Begin(curChild.gameObject, 0.2f, firstPos); if (childIndex < gridTran.childCount - 1) { StartCoroutine(DelayCallFun.DoDelay(() => { ItemsRowMove(); }, 0.2f)); } }
private void ItemsTweenStep1() { ceilIndex++; Transform curChild = gridTran.GetChild(ceilIndex); curChild.gameObject.SetActive(true); UIWidget wdgt = curChild.gameObject.GetComponent <UIWidget>(); if (wdgt != null) { Vector3 tempScale = wdgt.transform.localScale; wdgt.transform.localScale = Vector3.zero; TweenScale ta = TweenScale.Begin(curChild.gameObject, this.tweenDuration, tempScale); } if (ceilIndex < gridTran.childCount - 1) { StartCoroutine(DelayCallFun.DoDelay(() => { ItemsTweenStep1(); }, this.ceilTweenInterval)); } }