标签:style blog http color strong os
现在精灵在originPoint位置,要沿着弧线走到endPoint位置:
1 ccBezierConfig by; 2 by.controlPoint_1 = ccp(-controlX, 0); 3 by.controlPoint_2 = ccp(-controlX, controlY); 4 by.endPosition = ccp(0, controlY); 5 CCBezierBy *bezierBy = CCBezierBy::create(1.0f, by); 6 7 ccBezierConfig to; 8 to.controlPoint_1 = ccp(originPoint.x-controlX, originPoint.y); 9 to.controlPoint_2 = ccp(originPoint.x-controlX, endPoint.y); 10 to.endPosition = endPoint; 11 CCBezierTo *bezierTo = CCBezierTo::create(1.0f, to);
by是相对现在的位置
to是绝对位置
标签:style blog http color strong os
原文地址:http://www.cnblogs.com/say-one-say/p/3837943.html