cocos2d DrawNode图形渐变
//点变线 void HelloWorld::dotChangeToLine(int curMenutag) {log("dotChangeToLine"); //是一条窄窄的矩形线 DrawNode* drawmove = static_cast<DrawNode*>(PointMoveBox->getChildByTag(SolidLineTag)); //two words len subline drawhome->setVisible(false); this->schedule(schedule_selector(HelloWorld::updateDotToTVLine),DOT_UPDATE_TIME); }
void HelloWorld::updateDotToTVLine(float dt) //右边界越来越向右去 //如果宽度达到了标准,就停止渐变 if (lineWidth >= 2 * POINT_MOVE_Vec2x_Increment_Sixty) //when line width add to orign width,stop become width { this->unschedule(schedule_selector(HelloWorld::updateDotToTVLine)); //Node::unschedule("updateLineToDot"); log("unschedule updateDotToTVLine"); } } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |