예제 #1
0
    private void EndAni(EZAnimation obj)
    {
        this.m_Label_Label2.Visible = true;
        this.m_Label_Label3.Visible = true;
        this.m_LabelBack.Visible    = true;
        FadeSprite.Do(this.m_LabelBack, EZAnimation.ANIM_MODE.FromTo, new Color(1f, 1f, 1f, 0f), new Color(1f, 1f, 1f, 1f), new EZAnimation.Interpolator(EZAnimation.linear), ChapterStart_DLG.m_fTextAniTime, 0f, null, null);
        CQuestGroup questGroupByQuestUnique = NrTSingleton <NkQuestManager> .Instance.GetQuestGroupByQuestUnique(this.m_strCurrentQuestUnique);

        if (questGroupByQuestUnique == null)
        {
            return;
        }
        string empty             = string.Empty;
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("75");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            textFromInterface,
            "count",
            questGroupByQuestUnique.GetPage()
        });

        this.m_Label_Label2.Text = empty;
        this.m_Label_Label2.SetLocation((GUICamera.width - this.m_Label_Label2.width) / 2f, this.m_LabelBack.GetLocationY() + 20f);
        FadeText.Do(this.m_Label_Label2.spriteText, EZAnimation.ANIM_MODE.FromTo, new Color(1f, 1f, 1f, 0f), new Color(1f, 1f, 1f, 1f), new EZAnimation.Interpolator(EZAnimation.linear), ChapterStart_DLG.m_fTextAniTime, 0f, null, null);
        string groupTitle = questGroupByQuestUnique.GetGroupTitle();

        this.m_Label_Label3.Text = groupTitle;
        this.m_Label_Label3.SetLocation((GUICamera.width - this.m_Label_Label3.width) / 2f, this.m_LabelBack.GetLocationY() + 63f);
        FadeText.Do(this.m_Label_Label3.spriteText, EZAnimation.ANIM_MODE.FromTo, new Color(1f, 1f, 1f, 0f), new Color(1f, 1f, 1f, 1f), new EZAnimation.Interpolator(EZAnimation.linear), ChapterStart_DLG.m_fTextAniTime, 0f, null, null);
        TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "QUEST", "ACT", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
        this.m_fStartTime = Time.realtimeSinceStartup;
    }
예제 #2
0
 public void AlphaAni(float startA, float destA, float time)
 {
     SpriteRoot[] componentsInChildren = base.transform.GetComponentsInChildren <SpriteRoot>(true);
     if (componentsInChildren != null)
     {
         SpriteRoot[] array = componentsInChildren;
         for (int i = 0; i < array.Length; i++)
         {
             SpriteRoot spriteRoot = array[i];
             if (null != spriteRoot)
             {
                 FadeSprite.Do(spriteRoot, EZAnimation.ANIM_MODE.FromTo, new Color(spriteRoot.color.r, spriteRoot.color.g, spriteRoot.color.b, startA), new Color(spriteRoot.color.r, spriteRoot.color.g, spriteRoot.color.b, destA), new EZAnimation.Interpolator(EZAnimation.linear), time, 0f, null, null);
             }
         }
     }
     SpriteText[] componentsInChildren2 = base.transform.GetComponentsInChildren <SpriteText>(true);
     if (componentsInChildren2 != null)
     {
         SpriteText[] array2 = componentsInChildren2;
         for (int j = 0; j < array2.Length; j++)
         {
             SpriteText spriteText = array2[j];
             if (null != spriteText)
             {
                 FadeText.Do(spriteText, EZAnimation.ANIM_MODE.FromTo, new Color(spriteText.color.r, spriteText.color.g, spriteText.color.b, startA), new Color(spriteText.color.r, spriteText.color.g, spriteText.color.b, destA), new EZAnimation.Interpolator(EZAnimation.linear), time, 0f, null, null);
             }
         }
     }
 }
 public void FadeListItemContainer(float dur)
 {
     SpriteRoot[] componentsInChildren = base.transform.GetComponentsInChildren <SpriteRoot>(true);
     if (componentsInChildren != null)
     {
         SpriteRoot[] array = componentsInChildren;
         for (int i = 0; i < array.Length; i++)
         {
             SpriteRoot spriteRoot = array[i];
             if (null != spriteRoot)
             {
                 FadeSprite.Do(spriteRoot, EZAnimation.ANIM_MODE.FromTo, new Color(1f, 1f, 1f, 1f), new Color(1f, 1f, 1f, 0f), new EZAnimation.Interpolator(EZAnimation.linear), dur, 0f, null, null);
             }
         }
     }
     SpriteText[] componentsInChildren2 = base.transform.GetComponentsInChildren <SpriteText>(true);
     if (componentsInChildren2 != null)
     {
         SpriteText[] array2 = componentsInChildren2;
         for (int j = 0; j < array2.Length; j++)
         {
             SpriteText spriteText = array2[j];
             if (null != spriteText)
             {
                 FadeText.Do(spriteText, EZAnimation.ANIM_MODE.FromTo, new Color(1f, 1f, 1f, 1f), new Color(1f, 1f, 1f, 0f), new EZAnimation.Interpolator(EZAnimation.linear), dur, 0f, null, null);
             }
         }
     }
 }
    public static FadeSprite Do(SpriteRoot sprt, EZAnimation.ANIM_MODE mode, Color dest, EZAnimation.Interpolator interp, float dur, float delay, EZAnimation.CompletionDelegate startDel, EZAnimation.CompletionDelegate del)
    {
        FadeSprite fadeSprite = (FadeSprite)EZAnimator.instance.GetAnimation(EZAnimation.ANIM_TYPE.FadeSprite);

        fadeSprite.Start(sprt, mode, dest, interp, dur, delay, startDel, del);
        return(fadeSprite);
    }
예제 #5
0
    // ********************************************************************
    #endregion
    // ********************************************************************


    // ********************************************************************
    #region Public Methods
    // ********************************************************************
    public void ApplyScreenFlash(float _duration)
    {
        FadeSprite fader = GetComponent <FadeSprite>();

        fader.SetVisible(true);
        fader.duration = _duration;
        fader.FadeOut();
    }
예제 #6
0
    // Waits for the completed door animation and then loads the next scene
    IEnumerator LoadNextScene(Animator doorAnim)
    {
        yield return(new WaitUntil(() => doorAnim.GetCurrentAnimatorStateInfo(0).IsName("Door_open") && doorAnim.GetCurrentAnimatorStateInfo(0).normalizedTime >= 1f));

        StartCoroutine(FadeSprite.Fade(GetComponent <Rigidbody2D>(), gameObject.GetComponentInChildren <SpriteRenderer>(), 1f, 0f, 2f));
        yield return(new WaitForSeconds(2.5f));

        SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
    }
예제 #7
0
    void Awake()
    {
        collider               = GetComponent <Collider2D>();
        rigidbody              = GetComponent <Rigidbody2D>();
        pointEffector          = GetComponentInChildren <PointEffector2D>();
        spriteRendererEffector = GetComponentsInChildren <SpriteRenderer>()[1]; // :(
        fadeSprite             = GetComponentInChildren <FadeSprite>();
        scaleGameObject        = GetComponentInChildren <ScaleGameObject>();

        startForce = pointEffector.forceMagnitude;
        endForce   = 0.0f;
        breakDown  = false;
        timer      = 0.0f;
        spriteRendererEffector.color = attractColor;
    }
예제 #8
0
        public void SetFadeTextureFromBundle(string bundlepath)
        {
            this.imageKey = string.Empty;
            Texture2D texture = NrTSingleton <UIImageBundleManager> .Instance.GetTexture(bundlepath);

            if (null != texture)
            {
                base.SetTexture(texture);
                FadeSprite.Do(this, EZAnimation.ANIM_MODE.FromTo, new Color(0f, 0f, 0f, 0f), new Color(1f, 1f, 1f, 1f), new EZAnimation.Interpolator(EZAnimation.linear), 0.5f, 0f, null, null);
            }
            else
            {
                NrTSingleton <UIImageBundleManager> .Instance.RequestBundleImage(bundlepath, new PostProcPerItem(this.SetFadeImage));
            }
        }
예제 #9
0
    void Start()
    {
        body     = gameObject.GetComponent <Rigidbody2D>();
        animator = gameObject.GetComponent <Animator>();
        heldItem = null;
        input    = GameObject.FindObjectOfType <InputManager>();


        layerMask = (int)0x7FFFFFFF;


        for (int i = 0; i < avoidLayers.Length; i++)
        {
            layerMask ^= (1 << avoidLayers[i]);
        }

        // Lock movement and fade in
        StartCoroutine(FadeSprite.Fade(GetComponent <Rigidbody2D>(), gameObject.GetComponentInChildren <SpriteRenderer>(), 0f, 1f, 2f));
    }
예제 #10
0
    private void Start()
    {
        if (facingRight == true)
        {
            Flip();
        }

        layerMask = (int)0x7FFFFFFF;


        for (int i = 0; i < avoidLayers.Length; i++)
        {
            layerMask ^= (1 << avoidLayers[i]);
        }

        anim = gameObject.GetComponentInChildren <Animator>();

        // Lock movement and fade in
        StartCoroutine(FadeSprite.Fade(GetComponent <Rigidbody2D>(), gameObject.GetComponentInChildren <SpriteRenderer>(), 0f, 1f, 2f));
        //gameObject.GetComponentInChildren<SpriteRenderer>().color = new Color(1f, 1f, 1f, 0.5f);
    }
예제 #11
0
 // Use this for initialization
 void Start()
 {
     StartCoroutine(FadeSprite.FadeImage(gameObject.GetComponentInChildren <SpriteRenderer>(), 0f, 0f, 0.2f));
     StartCoroutine(waitForAnim());
 }
예제 #12
0
    public IEnumerator waitForAnim()
    {
        yield return(new WaitForSeconds(2.5f));

        StartCoroutine(FadeSprite.FadeImage(gameObject.GetComponentInChildren <SpriteRenderer>(), 0f, 1f, 1f));
    }
예제 #13
0
 private void SetFadeImage(WWWItem _item, object _param)
 {
     this.SetImage(_item, _param);
     FadeSprite.Do(this, EZAnimation.ANIM_MODE.FromTo, new Color(0f, 0f, 0f, 0f), new Color(1f, 1f, 1f, 1f), new EZAnimation.Interpolator(EZAnimation.linear), 0.5f, 0f, null, null);
 }
예제 #14
0
 void Awake()
 {
     fade    = GetComponent <FadeSprite>();
     scaling = GetComponent <ScaleGameObject>();
 }