Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: yuewah on June 26, 2014, 04:49:01 AM

Title: TypewriterEffect charsPerSecond is bounded by Framerate
Post by: yuewah on June 26, 2014, 04:49:01 AM
How to allow TypewriterEffect ignore from framerate ?
Title: Re: TypewriterEffect charsPerSecond is bounded by Framerate
Post by: ArenMook on June 26, 2014, 11:19:58 AM
Try this.
Title: Re: TypewriterEffect charsPerSecond is bounded by Framerate
Post by: yuewah on July 06, 2014, 09:33:17 PM
it only work for the first time, it failed if reset to beginning
Title: Re: TypewriterEffect charsPerSecond is bounded by Framerate
Post by: ArenMook on July 07, 2014, 03:58:53 AM
You should call Finish() before ResetToBeginning().

Can also probably change the function to:
  1.         public void ResetToBeginning ()
  2.         {
  3.                 Finish();
  4.                 mReset = true;
  5.                 mActive = true;
  6.         }
Title: Re: TypewriterEffect charsPerSecond is bounded by Framerate
Post by: yuewah on July 07, 2014, 10:03:18 AM
You should call Finish() before ResetToBeginning().

Can also probably change the function to:
  1.         public void ResetToBeginning ()
  2.         {
  3.                 Finish();
  4.                 mReset = true;
  5.                 mActive = true;
  6.         }

Thank, that's what I changed, would you add this fix to next update.
I think the common use case for the Typewriter Effect is Dialogue Text.
e.g.
1. Play the dialogue text with Typewriter Effect
2. Click to finish the text
3. Click again to update text with next dialogue
4. Repeat 1.
Title: Re: TypewriterEffect charsPerSecond is bounded by Framerate
Post by: ArenMook on July 08, 2014, 08:42:34 AM
Yup, already done.