level 3
void XqxLogistics::labelttf_init()
{
char tmp[15];
sprintf(tmp, "%d", XqxData::getInstance()->resource_base_all);
auto resource_all_lable=Label::createWithTTF(tmp,"fonts/kartika.ttf",42);
resource_all_lable->setColor(Color3B(175,213,249));
resource_all_lable->setPosition(Vec2(690,1562));
this->addChild(resource_all_lable,1,1111);//////////////////
resource_all_lable->setString("zzz");//这里的setString正常
..............
}
//在另一个函数里
void XqxLogistics::particular_bjBack(cocos2d::Ref* pSender)
{
this->removeChildByTag(particular_bj_tag);
this->removeChildByTag(particular_tag);
this->removeChildByTag(particular_resource_food_tag);
this->removeChildByTag(particular_build_tag);
auto zz=this->getChildByTag(1111);
zz->setString("111");//VS提示错误 3 error C2039: “setstring”: 不是“cocos2d::Node”的成
}
2015年08月22日 05点08分
1
{
char tmp[15];
sprintf(tmp, "%d", XqxData::getInstance()->resource_base_all);
auto resource_all_lable=Label::createWithTTF(tmp,"fonts/kartika.ttf",42);
resource_all_lable->setColor(Color3B(175,213,249));
resource_all_lable->setPosition(Vec2(690,1562));
this->addChild(resource_all_lable,1,1111);//////////////////
resource_all_lable->setString("zzz");//这里的setString正常
..............
}
//在另一个函数里
void XqxLogistics::particular_bjBack(cocos2d::Ref* pSender)
{
this->removeChildByTag(particular_bj_tag);
this->removeChildByTag(particular_tag);
this->removeChildByTag(particular_resource_food_tag);
this->removeChildByTag(particular_build_tag);
auto zz=this->getChildByTag(1111);
zz->setString("111");//VS提示错误 3 error C2039: “setstring”: 不是“cocos2d::Node”的成
}