//程序开始后延时2秒才开始addSprite函数 scheduleOnce(schedule_selector(Issue1305::addSprite), 2); 转到定义: void CCNode::scheduleOnce(SEL_SCHEDULE selector, float delay) { this->schedule(selector, 0.0f, 0, delay); }
void Issue1305::addSprite(float dt) { m_pSpriteTmp->setPosition(ccp(250,250)); addChild(m_pSpriteTmp); }