【发布时间】:2016-01-21 10:12:53
【问题描述】:
我一直在尝试将标签的颜色从透明变为黑色。我几乎没有成功。标签在整个动画过程中保持完全透明。这是我使用的代码。由于其他 Actor 正常工作,舞台已正确设置。
Label.LabelStyle lsBy = new Label.LabelStyle(byFont, new Color(0,0,0,0));
Label byLabel = new Label("text to animate",lsBy);
ColorAction ca= new ColorAction();
ca.setEndColor(new Color(0,0,0,1));
ca.setDuration(0.8f);
label.addAction(ca);
为标签文本颜色设置动画的正确方法是什么?
【问题讨论】: