简体   繁体   English

如何设置CCLabelTTF的字体大小的动画?

[英]How do I animate the font size of CCLabelTTF?

I would like to perform an animation on a CCLabelTTF, where the font size is being animated. 我想在CCLabelTTF上执行动画,在其中字体大小被动画化。 I do not want to use CCScaleTo because (of course) then the quality is bad. 我不想使用CCScaleTo因为(当然)然后质量很差。 Has anybody got a clue how to do that ? 有人知道该怎么做吗?

I´m afraid you can not animate font size on a CCLabelTTF, you can set the maximun font size you want for your label and then use setScale or CCScaleTo. 恐怕您无法在CCLabelTTF上设置字体大小的动画,可以设置标签所需的最大字体大小,然后使用setScale或CCScaleTo。 But take notice that CCLabelTTF is slower than CCLabelBMFont, in my opinion is better to render the bitmap font with any program like bmGlyph, and then use CCLabelBMFont, take a look at cocos2d reference . 但是请注意CCLabelTTF比CCLabelBMFont慢,我认为最好使用bmGlyph之类的任何程序渲染位图字体,然后使用CCLabelBMFont,看看cocos2d reference But anyway you´ll have to scale the label. 但是无论如何,您都必须缩放标签。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM