IEnumerator ShowContainerCo(GameObject container, string actionCode) { if (container != null) { container.HideChildren(true); foreach (GameObjectInactive inactive in container.GetComponentsInChildren <GameObjectInactive>(true)) { if (inactive.name == actionCode || inactive.name.IndexOf(actionCode + "-") > -1) { inactive.gameObject.Show(); var animate = inactive.gameObject.GetComponent <GameObjectBouncy>(); if (animate != null) { animate.Animate(); } UITweenerUtil.FadeTo(inactive.gameObject, UITweener.Method.Linear, UITweener.Style.Once, .5f, .6f, 1f); //if(actionsMode != GameActionsMode.Loading) { // if(inactive.name.IndexOf(actionCode + "-Settings") > -1) { // AppViewerUIPanelHUD.ShowExtraContainer(); // } // else { // AppViewerUIPanelHUD.HideExtraContainer(); // } //} } } } yield break; }
public static TweenAlpha FadeTo(GameObject go, UITweener.Method method, UITweener.Style style, float duration, float delay, float alphaFrom, float alphaTo) { if (go == null) { return(null); } //go.RemoveComponent<TweenAlpha>(); TweenAlpha comp = UITweenerUtil.Begin <TweenAlpha>(go, method, style, duration, delay); //comp.ResetToBeginning(); comp.from = alphaFrom; comp.to = alphaTo; comp.duration = duration; comp.delay = delay; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } comp = ResetTween(comp); comp.Play(true); return(comp); }
public virtual void HideCoinsObject() { if (coinObject != null) { UITweenerUtil.FadeTo(coinObject, UITweener.Method.EaseInOut, UITweener.Style.Once, .3f, .3f, 0f); } }
public virtual void AnimateStartCharacter() { if (containerStartObject != null) { UITweenerUtil.FadeTo(containerStartObject, UITweener.Method.EaseInOut, UITweener.Style.PingPong, 2f, 0f, .5f); } }
public virtual void AnimateOutBottom(GameObject go, float time, float delay) { if (go != null) { UITweenerUtil.MoveTo(go, UITweener.Method.EaseInOut, UITweener.Style.Once, time, delay, Vector3.zero.WithY(bottomClosedY)); } }
public virtual void AnimateOutRightTop(GameObject go, float time, float delay) { if (go != null) { UITweenerUtil.MoveTo(go, UITweener.Method.EaseInOut, UITweener.Style.Once, time, delay, Vector3.zero.WithX(rightClosedX)); } }
public virtual void ShowTitleObject() { if (titleObject != null) { UITweenerUtil.FadeTo(titleObject, UITweener.Method.EaseInOut, UITweener.Style.Once, 1f, .3f, 1f); } }
public virtual void ShowOverlayWhiteStatic(float time, float delay, float amountFrom, float amountTo) { if (overlayWhiteSolidStatic != null) { UITweenerUtil.FadeTo(overlayWhiteSolidStatic, UITweener.Method.Linear, UITweener.Style.Once, time, delay, amountFrom, amountTo); } }
// public virtual void ShowBackgroundStarry() { if (backgroundStarryObject != null) { UITweenerUtil.FadeTo(backgroundStarryObject, UITweener.Method.Linear, UITweener.Style.Once, durationShow, durationDelayShow, 1f); } }
public virtual void HideBackgroundStarryTop() { if (backgroundStarryTopObject != null) { UITweenerUtil.FadeTo(backgroundStarryTopObject, UITweener.Method.Linear, UITweener.Style.Once, durationHide, durationDelayHide, 0f); } }
public virtual void HideOverlayBlack(float time, float delay, float amountFrom, float amountTo) { if (overlayBlackSolid != null) { UITweenerUtil.FadeTo(overlayBlackSolid, UITweener.Method.Linear, UITweener.Style.Once, time, delay, amountFrom, amountTo); } }
public virtual void HideOverlayWhiteRadial(float time, float delay, float amountFrom, float amountTo) { if (overlayWhiteRadial != null) { UITweenerUtil.FadeTo(overlayWhiteRadial, UITweener.Method.Linear, UITweener.Style.Once, time, delay, amountFrom, amountTo); } }
public virtual void HideInputObject(float time, float delay) { UITweenerUtil.MoveTo( gameObject, UITweener.Method.EaseInOut, UITweener.Style.Once, time, delay, Vector3.zero.WithY(3000)); controlsVisible = false; }
public virtual void FadeOutObjectNow(GameObject go) { if (go != null) { LogUtil.Log("FadeOutObjectNow:" + go.name); UITweenerUtil.FadeOutNow(go); HideObject(go); } }
public static void SetButtonColor(Image buttonTo, Color colorTo) { if (buttonTo == null) { return; } UITweenerUtil.ColorTo(buttonTo.gameObject, UITweener.Method.Linear, UITweener.Style.Once, .5f, 0f, colorTo); }
public static void SetLabelColor(Text labelTo, Color colorTo) { if (labelTo == null) { return; } UITweenerUtil.ColorTo(labelTo.gameObject, UITweener.Method.Linear, UITweener.Style.Once, .5f, 0f, colorTo); }
public virtual void FadeOutObject(GameObject go) { if (go != null) { LogUtil.Log("FadeOutObject:" + go.name); UITweenerUtil.FadeOut(go); // iTween.FadeTo(go, 0f, 1f);//(go, iTween.Hash("alpha", 0f, "delay", 0f, "time", 1f)); HideObjectDelayed(go, 1f); } }
public virtual void AnimateObjectFadeOut(GameObject go) { if (go != null) { UITweenerUtil.FadeTo( go, UITweener.Method.EaseInOut, UITweener.Style.Once, 2f, 0f, 0f); } }
public void HideTipsObjects() { if (containerTips != null) { foreach (UIPanelTips tips in containerTips.GetComponentsInChildren <UIPanelTips>(true)) { tips.gameObject.Hide(); UITweenerUtil.FadeTo(tips.gameObject, UITweener.Method.Linear, UITweener.Style.Once, .4f, 0f, 0f); } } }
public static void SetSpriteColor(GameObject go, Color colorTo) { if (go == null) { return; } if (go != null) { UITweenerUtil.ColorTo(go, UITweener.Method.Linear, UITweener.Style.Once, .5f, 0f, colorTo); } }
public void UpdateColor() { if (lastColorHighlight != colorHighlight) { lastColorHighlight = colorHighlight; if (containerHighlighted != null) { UITweenerUtil.ColorToHandler <UISprite>( containerHighlighted, colorHighlight, 1f, 0f); } } }
public virtual void AnimateStartCharacter() { if (containerStartObject != null) { UITweenerUtil.FadeTo(containerStartObject, UITweener.Method.EaseInOut, UITweener.Style.PingPong, 2f, 0f, .5f); } /* * if(buttonPlayerGlowObject != null) { * UITweenerUtil.FadeTo(buttonPlayerGlowObject.gameObject, * UITweener.Method.EaseInOut, UITweener.Style.PingPong, 2f, 0f, .1f); * } */ }
public virtual IEnumerator FadeInObjectCo(GameObject go, float delay) { yield return(new WaitForSeconds(delay)); if (go != null) { if (!go.activeInHierarchy || !go.activeSelf) { ShowObject(go); } LogUtil.Log("FadeInObject:" + go.name); UITweenerUtil.FadeIn(go); //iTween.FadeTo(go, 1f, 2f); } }
public void ShowDialog() { float openPos = positionYOpenInGame; LogUtil.Log("ShowDialog:" + openPos); Vector3 temp = notificationPanel.transform.position; temp.y = openPos; UITweenerUtil.MoveTo(notificationPanel, UITweener.Method.EaseIn, UITweener.Style.Once, .5f, 0f, temp); Invoke("HideDialog", 4f); SetStateShowing(); }
public virtual void AnimateObjectPingPong(GameObject go) { if (go != null) { UITweenerUtil.FadeTo( go, UITweener.Method.EaseInOut, UITweener.Style.Once, .5f, 0f, 1f); UITweenerUtil.FadeTo( go, UITweener.Method.EaseInOut, UITweener.Style.PingPong, .5f, .5f, .4f); } }
public void ShowTipsObject(string objName) { if (containerTips != null) { HideTipsObjects(); foreach (UIPanelTips tips in containerTips.GetComponentsInChildren <UIPanelTips>(true)) { if (!string.IsNullOrEmpty(objName) && tips.name.Contains(objName)) { tips.gameObject.Show(); UITweenerUtil.FadeTo(tips.gameObject, UITweener.Method.Linear, UITweener.Style.Once, 0f, 0f, 0f); tips.ShowTipsFirst(); UITweenerUtil.FadeTo(tips.gameObject, UITweener.Method.Linear, UITweener.Style.Once, .5f, .6f, 1f); } } } }
public virtual void ShowPanelTop(GameObject panel, bool fade) { if (panel != null) { //UITweenerUtil.MoveTo(panel, //// UITweener.Method.Linear, UITweener.Style.Once, 0f, 0f, // Vector3.zero.WithX(leftOpenX).WithY(topClosedY)); if (fade) { UITweenerUtil.FadeTo(panel, UITweener.Method.Linear, UITweener.Style.Once, durationShow, durationDelayShow, .7f); } UITweenerUtil.MoveTo(panel, UITweener.Method.EaseInOut, UITweener.Style.Once, durationShow, durationDelayShow, Vector3.zero.WithY(topOpenY)); } }
public virtual void HidePanelBottom(GameObject panel, bool fade) { if (panel != null) { if (fade) { UITweenerUtil.FadeTo(panel, UITweener.Method.Linear, UITweener.Style.Once, durationHide, durationDelayHide, 0f); } UITweenerUtil.MoveTo(panel, UITweener.Method.EaseInOut, UITweener.Style.Once, durationHide, durationDelayHide, Vector3.zero.WithY(bottomClosedY)); //UITweenerUtil.MoveTo(panel, // UITweener.Method.Linear, UITweener.Style.Once, durationHide, durationHide * 2, // Vector3.zero.WithX(leftClosedX).WithY(bottomClosedY)); } }
public void HideDialog() { if (notificationPanel == null) { return; } float closedPos = positionYClosedInGame; LogUtil.Log("HideDialog:" + closedPos); Vector3 temp = notificationPanel.transform.position; temp.y = closedPos; UITweenerUtil.MoveTo(notificationPanel, UITweener.Method.EaseIn, UITweener.Style.Once, .6f, .9f, temp); Invoke("DisplayNextNotification", 1); }
public virtual void HidePanelRight(GameObject panel, bool fade) { if (panel != null) { if (fade) { UITweenerUtil.FadeTo(panel, UITweener.Method.Linear, UITweener.Style.Once, durationHide * 2, durationHide * 2, 0f); } UITweenerUtil.MoveTo(panel, UITweener.Method.EaseInOut, UITweener.Style.Once, durationHide * 2, 0f, Vector3.zero.WithX(rightClosedX)); //UITweenerUtil.MoveTo(panel, // UITweener.Method.Linear, UITweener.Style.Once, durationHide * 4, durationHide * 8, // Vector3.zero.WithX(rightClosedX).WithY(topClosedY)); } }