In LibGDX, I want to make a text animation for my game. Therefore, I want that my labels gets larger with time. But if I use the scaleTo()
method, nothing happens whereas other Actions like moveTo()
work fine.
label1 = new Label("Test text", new Label.LabelStyle(font, Color.BLACK));
label2.addAction(Actions.parallel(Actions.moveTo(500, 300, 2.0f),Actions.scaleTo(0.1f, 0.1f,2.0f)));
label2 = new Label("Test text 2", new Label.LabelStyle(font, Color.BLACK));
label2.addAction(Actions.parallel(Actions.moveTo(500, 300, 2.0f),Actions.scaleTo(0.1f, 0.1f,2.0f)));
stage.addActor(label1);
stage.addActor(label2);
How can I make my labels scale? Thank you in advance!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…