@JETeran wrote:
Greetings.
I have been researching about how to make a dynamic text appear. It means that each letter will appear one after the other one, simulating different animation actions.
I came up with this:
First, create a label and then add it to the scene.auto label = Label::createWithBMFont("fonts/bitmapFontTest.fnt", "Bitmap Font Atlas"); addChild(label);
Then, we store the letters B in Bchar, F in FChar and A in AChar as sprites, so far so good.
auto BChar = (Sprite*) label->getLetter(0); auto FChar = (Sprite*) label->getLetter(7); auto AChar = (Sprite*) label->getLetter(13);
We create an action, and then we apply it:
auto jump = JumpBy::create(0.5f, Vec2::ZERO, 60, 1); auto jump_4ever = RepeatForever::create(jump); FChar->runAction(jump_4ever);
Now, I believe that I will need a scheduler and a 'for' (?) to go through each letter, so we can have the animation of each one.
Any suggestions?
Thank you.
Posts: 1
Participants: 1