UGUI 如何实现文本打字效果
发表于2017-10-16
熟悉NGUI的人肯定知道文本打字效果的实现方法,可能有些人觉得NGUI弄的有些繁琐, 可以尝试将NGUI的TypewriterEffect类转成 UGUI特定的的方式实现文本打字效果。
这里只是简化的内容,但足够大家大家去看。
还没有完
想使用前几天 介绍的插件 TextFX 实现这个功能:
还有就是使用 插件 DoTween 实现这个动能:
Text (Unity UI 4.6)
DOText(string to, float duration, bool richTextEnabled = true, ScrambleMode scrambleMode = ScrambleMode.None, string scrambleChars = null) Tweens the target's text to the given value. richTextEnabled If TRUE (default), rich text will be interpreted correctly while animated, otherwise all tags will be considered as normal text. scramble The type of scramble mode to use, if any. If different than ScrambleMode.None the string will appear from a random animation of characters, otherwise it will compose itself regularly. None (default): no scrambling will be applied. All/Uppercase/Lowercase/Numerals: type of characters to be used while scrambling. Custom: will use the custom characters in scrambleChars. scrambleChars A string containing the characters to use for custom scrambling. Use as many characters as possible (minimum 10) because DOTween uses a fast scramble mode which gives better results with more characters.
