Exemplo n.º 1
0
 public virtual void FadeOutObject(GameObject go)
 {
     if (go != null)
     {
         TweenUtil.FadeToObject(go, 0f);
         go.HideObjectDelayed(1f);
     }
 }
Exemplo n.º 2
0
 public virtual void FadeOutObjectNow(GameObject go)
 {
     if (go != null)
     {
         TweenUtil.FadeToObject(go, 0f, 0f, 0f);
         go.Hide();
     }
 }
    public virtual void AnimateObjectFadeOut(GameObject go)
    {
        if (go != null)
        {
            TweenUtil.FadeToObject(go, 0f, 2f, 0f);

            //UITweenerUtil.FadeTo(
            //    go,
            //    UITweener.Method.EaseInOut,
            //    UITweener.Style.Once,
            //    2f, 0f, 0f);
        }
    }
Exemplo n.º 4
0
    public virtual IEnumerator FadeInObjectCo(GameObject go, float delay)
    {
        yield return(new WaitForSeconds(delay));

        if (go != null)
        {
            if (!go.activeInHierarchy || !go.activeSelf)
            {
                go.Show();
            }
            TweenUtil.FadeToObject(go, 1f);
        }
    }
Exemplo n.º 5
0
    public void HideTipsObjects()
    {
        if (containerTips != null)
        {
            foreach (UIPanelTips tips in containerTips.GetComponentsInChildren <UIPanelTips>(true))
            {
                tips.gameObject.Hide();

                TweenUtil.FadeToObject(tips.gameObject, 0f, .4f, 0f);

                //UITweenerUtil.FadeTo(tips.gameObject, UITweener.Method.Linear, UITweener.Style.Once, .4f, 0f, 0f);
            }
        }
    }
Exemplo n.º 6
0
    public virtual void AnimateStartCharacter()
    {
        if (containerStartObject != null)
        {
            TweenUtil.FadeToObject(
                containerStartObject, .5f, 2f, 0f, true,
                TweenCoord.local, TweenEaseType.quadEaseInOut, TweenLoopType.pingPong);

            //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);
         * }
         */
    }
Exemplo n.º 7
0
    public virtual void HideBackButtonObject()
    {
        if (backObject != null)
        {
            TweenUtil.HideObjectLeft(backObject);

            //UITweenerUtil.MoveTo(backObject,
            //    UITweener.Method.EaseInOut, UITweener.Style.Once, .3f, .3f, Vector3.zero.WithX(-3000));

            //UITweenerUtil.FadeTo(backObject,
            //    UITweener.Method.EaseInOut, UITweener.Style.Once, .3f, .3f, 0f);

            foreach (Transform t in backObject.transform)
            {
                TweenUtil.FadeToObject(t.gameObject, 0f, .3f);

                //UITweenerUtil.FadeTo(t.gameObject,
                //UITweener.Method.EaseInOut, UITweener.Style.Once, .3f, .3f, 0f);
            }
        }
    }
    public virtual void AnimateObjectPingPong(GameObject go)
    {
        if (go != null)
        {
            TweenUtil.FadeToObject(go, 1f, .5f, 0f);

            TweenUtil.FadeToObject(go, .4f, .5f, .5f, false,
                                   TweenCoord.local, TweenEaseType.quadEaseInOut, TweenLoopType.pingPong);

            //UITweenerUtil.FadeTo(
            //    go,
            //    UITweener.Method.EaseInOut,
            //    UITweener.Style.Once,
            //    .5f, 0f, 1f);

            //UITweenerUtil.FadeTo(
            //    go,
            //    UITweener.Method.EaseInOut,
            //    UITweener.Style.PingPong,
            //    .5f, .5f, .4f);
        }
    }
Exemplo n.º 9
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();

                    TweenUtil.FadeToObject(tips.gameObject, 0f, 0f, 0f);
                    //UITweenerUtil.FadeTo(tips.gameObject, UITweener.Method.Linear, UITweener.Style.Once, 0f, 0f, 0f);

                    tips.ShowTipsFirst();

                    TweenUtil.FadeToObject(tips.gameObject, 1f, .5f, .6f);
                    //UITweenerUtil.FadeTo(tips.gameObject, UITweener.Method.Linear, UITweener.Style.Once, .5f, .6f, 1f);
                }
            }
        }
    }
Exemplo n.º 10
0
    public virtual void ShowBackButtonObject()
    {
        if (backObject != null)
        {
            backerObject.Show();

            TweenUtil.ShowObjectLeft(backObject);

            //UITweenerUtil.MoveTo(backObject,
            //    UITweener.Method.EaseInOut, UITweener.Style.Once, .3f, .3f, Vector3.zero);

            //UITweenerUtil.FadeTo(backObject,
            //    UITweener.Method.EaseInOut, UITweener.Style.Once, 1f, .3f, 1f);

            foreach (Transform t in backObject.transform)
            {
                TweenUtil.FadeToObject(t.gameObject, 1f, 1f);

                //UITweenerUtil.FadeTo(t.gameObject,
                //    UITweener.Method.EaseInOut, UITweener.Style.Once, 1f, .3f, 1f);
            }
        }
    }
Exemplo n.º 11
0
    IEnumerator ShowContainerCo(GameObject container, string tipCode)
    {
        if (container != null)
        {
            container.HideChildren(true);

            foreach (GameObjectInactive inactive in container.GetComponentsInChildren <GameObjectInactive>(true))
            {
                if (inactive.name == tipCode ||
                    inactive.name.IndexOf(tipCode + "-") > -1)
                {
                    inactive.gameObject.Show();

                    var animate = inactive.gameObject.GetComponent <GameObjectBouncy>();
                    if (animate != null)
                    {
                        animate.Animate();
                    }

                    TweenUtil.FadeToObject(inactive.gameObject, 1f, .5f, .6f);

                    //UITweenerUtil.FadeTo(inactive.gameObject, UITweener.Method.Linear, UITweener.Style.Once, .5f, .6f, 1f);
                    //if(tipsMode != TipsMode.Loading) {
                    //  if(inactive.name.IndexOf(tipCode + "-Settings") > -1) {
                    //      AppViewerUIPanelHUD.ShowExtraContainer();
                    //  }
                    //  else {
                    //      AppViewerUIPanelHUD.HideExtraContainer();
                    //  }
                    //}
                }
            }
        }


        yield break;
    }
Exemplo n.º 12
0
 public virtual void HideCoinsObject()
 {
     TweenUtil.FadeToObject(coinObject, 0f);
 }
Exemplo n.º 13
0
 public virtual void ShowCoinsObject()
 {
     TweenUtil.FadeToObject(coinObject, 1f);
 }
Exemplo n.º 14
0
 public virtual void HideTitleObject()
 {
     TweenUtil.FadeToObject(titleObject, 0f);
 }
Exemplo n.º 15
0
 public virtual void ShowTitleObject()
 {
     TweenUtil.FadeToObject(titleObject, 1f);
 }
 void UpdateState()
 {
     TweenUtil.FadeToObject(gameObject, collected ? 1f : .4f);
 }
Exemplo n.º 17
0
    //

    public virtual void ShowBackgroundStarry()
    {
        TweenUtil.FadeToObject(backgroundStarryObject, 1f, durationShow, durationDelayShow);
    }
Exemplo n.º 18
0
 public virtual void HideBackgroundPlain()
 {
     TweenUtil.FadeToObject(backgroundPlainObject, 0f, durationShow, durationDelayShow);
 }
Exemplo n.º 19
0
 public virtual void ShowBackerObject()
 {
     TweenUtil.FadeToObject(backerObject, 1f);
 }
Exemplo n.º 20
0
 public virtual void HideBackgroundStarryTop()
 {
     TweenUtil.FadeToObject(backgroundStarryTopObject, 0f, durationShow, durationDelayShow);
 }
Exemplo n.º 21
0
 public virtual void HideBackerObject()
 {
     TweenUtil.FadeToObject(backerObject, 0f);
 }