Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - WinWin123

Pages: [1]
1
NGUI 3 Support / Typewriter Effect OnFinish problem
« on: December 29, 2015, 11:00:33 PM »
Hello, in the Update function of the TypewriterEffect.cs
void Update ()
   {
                .............Other codes

      // Alpha-based fading
      if (mCurrentOffset >= mFullText.Length)
      {
         mLabel.text = mFullText;
      }
      else if (mFade.size != 0)
      {
         //..........Other codes
      }
      else if (mCurrentOffset >= mFullText.Length)
      {
         current = this;
         EventDelegate.Execute(onFinished);
         current = null;
         mActive = false;
      }
   }

The first if condition is the same as the last else if condition (mCurrentOffset >= mFullText.Length)
So basically it will never enter the last else if block and execute the onFinish function?
( I have changed the last "else if" to "if" for now )
Thanks~

Pages: [1]