Пример #1
0
    protected void FadeOut_()
    {
        IsHidden_ = true;

        TweenColor colorTweener = TweenColor.Begin <TweenColor>(fadeTexture.gameObject, appearFadeDuration);

        colorTweener.from       = fadeTexture.color;
        colorTweener.to         = new Color(0f, 0f, 0f, 0f);
        colorTweener.onFinished = (tween) =>
        {
            if (mInstance)
            {
                Destroy(mInstance.gameObject);
                mInstance = null;
            }
        };

        TweenAlpha alphaTween = TweenAlpha.Begin <TweenAlpha>(rotatedSprite.gameObject, appearFadeDuration);

        alphaTween.from       = rotatedSprite.alpha;
        alphaTween.to         = 0.0f;
        alphaTween.onFinished = (tween) =>
        {
            NGUITools.SetActive(rotatedSprite.gameObject, false);
        };
    }
Пример #2
0
 void OnApplicationQuit()
 {
     if (mInstance != null)
     {
         if (Application.isEditor)
         {
             DestroyImmediate(mInstance.gameObject);
         }
         else
         {
             Destroy(mInstance.gameObject);
         }
         mInstance = null;
     }
 }
Пример #3
0
 static bool LoadingOrAlertDisablingEvents(UICamera cam)
 {
     if (!UIAlertViewFactory.IsHidden)
     {
         return(cam != UIAlertViewFactory.GetAlertViewCamera());
     }
     else if (!UILoadingIndicatorFactory.IsHidden)
     {
         return(cam != UILoadingIndicatorFactory.GetLoadingIndicatorCamera());
     }
     else
     {
         return(false);
     }
 }