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;
    }
Esempio n. 2
0
    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);
    }
Esempio n. 3
0
 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);
     }
 }
Esempio n. 5
0
 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));
     }
 }
Esempio n. 6
0
 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));
     }
 }
Esempio n. 7
0
 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);
     }
 }
Esempio n. 13
0
    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;
    }
Esempio n. 14
0
 public virtual void FadeOutObjectNow(GameObject go)
 {
     if (go != null)
     {
         LogUtil.Log("FadeOutObjectNow:" + go.name);
         UITweenerUtil.FadeOutNow(go);
         HideObject(go);
     }
 }
Esempio n. 15
0
    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);
    }
Esempio n. 16
0
    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);
    }
Esempio n. 17
0
    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);
        }
    }
Esempio n. 18
0
 public virtual void AnimateObjectFadeOut(GameObject go)
 {
     if (go != null)
     {
         UITweenerUtil.FadeTo(
             go,
             UITweener.Method.EaseInOut,
             UITweener.Style.Once,
             2f, 0f, 0f);
     }
 }
Esempio n. 19
0
 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);
         }
     }
 }
Esempio n. 20
0
    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);
        }
    }
Esempio n. 21
0
    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);
         * }
         */
    }
Esempio n. 23
0
    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);
        }
    }
Esempio n. 24
0
    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();
    }
Esempio n. 25
0
    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);
        }
    }
Esempio n. 26
0
    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);
                }
            }
        }
    }
Esempio n. 27
0
    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));
        }
    }
Esempio n. 28
0
    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));
        }
    }
Esempio n. 29
0
    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);
    }
Esempio n. 30
0
    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));
        }
    }