Hi!
I have a problem when i’m try add a Sprite and a Label in a parent node. I was trying test on android and ios it works perfectly (fps: 60), but i test on WP8 (Lumia 730). FPS is 4fps
Here is my code
bool HelloWorld::init()
{
// Init
if ( !Layer::init() ) return false;
for (int i = 0; i<100; i++)
{
// Parent Node
Node *pNode = Node::create();
pNode->setPosition(rand()%800, rand()%800);
this->addChild(pNode);
// Add Label
Label *pLabel = Label::createWithTTF("My Text", "fonts/Marker Felt.ttf", 30);
pLabel->setColor(Color3B::RED);
pNode->addChild(pLabel, 0);
// Add Sprite
Sprite *pSprite = Sprite::create("CloseNormal.png");
pNode->addChild(pSprite, 1);
}
return true;
}
When i try
bool HelloWorld::init()
{
// Init
if ( !Layer::init() ) return false;
for (int i = 0; i<100; i++)
{
// Parent Node
Node *pNode = Node::create();
pNode->setPosition(rand()%800, rand()%800);
this->addChild(pNode);
// Add Label
Label *pLabel = Label::createWithTTF("My Text", "fonts/Marker Felt.ttf", 30);
pLabel->setColor(Color3B::RED);
this->addChild(pLabel, 0);
// Add Sprite
Sprite *pSprite = Sprite::create("CloseNormal.png");
this->addChild(pSprite, 1);
}
return true;
}
It works well. FPS is 60 on Lumia 730
Please explain and give me solution. Thanks!
?