Author Topic: TypewriterEffect Bug?  (Read 6426 times)

Mistborn

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 6
    • View Profile
TypewriterEffect Bug?
« on: July 08, 2015, 06:55:44 AM »
In NGUI 3.8.0, the way I determine whether the typing is finished or not is by checking TypewriterEffect.isActive. But in NGUI 3.9.0b, it never returns true. Is it a bug or not?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TypewriterEffect Bug?
« Reply #1 on: July 08, 2015, 08:13:43 PM »
Check the statement on line 211. It needs to be this:
  1.                 // Alpha-based fading
  2.                 if (mCurrentOffset >= mFullText.Length)
  3.                 {
  4.                         mLabel.text = mFullText;
  5.                         current = this;
  6.                         EventDelegate.Execute(onFinished);
  7.                         current = null;
  8.                         mActive = false;
  9.                 }
  10.                 else if (mFade.size != 0)

Mistborn

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: TypewriterEffect Bug?
« Reply #2 on: July 08, 2015, 08:33:09 PM »
Thank you. This workaround does fix it!  :)