//CCMoveBy 創(chuàng)建1個(gè)移動(dòng)的動(dòng)作 //參數(shù)1:移動(dòng)到目標(biāo)坐標(biāo)所需的時(shí)間 //參數(shù)2:目標(biāo)坐標(biāo) //支持reverse 可以獲得其反向動(dòng)作 //CCMoveTo 1樣的 //CCActionInterval * moveBy = CCMoveBy::create(5,ccp(300, 100)); //CCActionInterval * actionmoveback= moveBy->reverse(); //sp->runAction(actionmoveback); |
//CCScaleTo 作用:創(chuàng)建1個(gè)縮放的動(dòng)作 //參數(shù)1:到達(dá)縮放大小所需的時(shí)間 //參數(shù)2 :縮放的比例 //CCActionInterval * scaleto = CCScaleTo ::create(2, 2); //sp->runAction(scaleto); |
//CCScaleBy 作用:創(chuàng)建1個(gè)縮放的動(dòng)作 //參數(shù)1:到達(dá)縮放大小的所需時(shí)間 //參數(shù)2:縮放比例 //CCActionInterval * scaleby = CCScaleBy::create(2, 2); //CCActionInterval * actionbyback = scaleby->reverse(); //sp->runAction(actionbyback); |
//CCRotateTo作用創(chuàng)建1個(gè)旋轉(zhuǎn)的動(dòng)作 //參數(shù)1:旋轉(zhuǎn)的時(shí)間 //參數(shù)2:旋轉(zhuǎn)餓角度 0 - 360 //CCActionInterval * rotateto = CCRotateTo::create(2, 90); //sp->runAction(rotateto); |
//CCSkewTo作用創(chuàng)建1個(gè)傾斜的動(dòng)作 //參數(shù)1:傾斜到特定角度所需的時(shí)間 //參數(shù)2:x軸的傾斜角度 //參數(shù)3:y軸的傾斜角度 //CCActionInterval * skewto = CCSkewTo::create(2, 10, 10); //sp->runAction(skewto); |
//CCJumpTo 作用:創(chuàng)建1個(gè)跳的動(dòng)作 //參數(shù)1:跳到目標(biāo)動(dòng)作位子的所需時(shí)間 //參數(shù)2:目標(biāo)位置 //參數(shù)3:跳的高度 //參數(shù)4跳到目標(biāo)位置的次數(shù) //CCActionInterval* jumpto = CCJumpTo ::create(2, ccp(300, 200), 50, 4 ); //sp->runAction(jumpto); |
//CCJumpBy作用:創(chuàng)建1個(gè)跳的動(dòng)作 //參數(shù)1:跳到目標(biāo)動(dòng)作位子的所需時(shí)間 //參數(shù)2:目標(biāo)位置 //參數(shù)3:跳的高度 //參數(shù)4跳到目標(biāo)位置的次數(shù) //這個(gè)支持方向動(dòng)作reverse //CCActionInterval * jumpby = CCJumpBy ::create(3, ccp(300, 200), 50, 4); //CCActionInterval * ac= jumpby->reverse(); //sp->runAction(ac); |
//CCBezier //ccBezierConfig結(jié)構(gòu)體 //ccBezierConfig bezierCon; //bezierCon.controlPoint_1=CCPointMake(200, 150);//控制點(diǎn)1 //bezierCon.controlPoint_2=CCPointMake(200, 160);//控制點(diǎn)2 //bezierCon.endPosition =CCPointMake(340, 100);// 結(jié)束位置
// CCBezierTo // 創(chuàng)建1個(gè)貝塞爾曲線(xiàn)運(yùn)動(dòng)的動(dòng)作 // 參數(shù)1:貝塞爾曲線(xiàn)運(yùn)動(dòng)的時(shí)間 // 參數(shù)2 :ccBezierConfig結(jié)構(gòu)體 // CCActionInterval * action = CCBezierTo::create(2, bezierCon); // CCActionInterval * action = CCBezierBy::create(3, bezierCon);//支持反向 // CCActionInterval * action1 = action->reverse(); // sp->runAction(action1); |
// CCFadeIn // 作用:創(chuàng)建1個(gè)漸變出現(xiàn)的動(dòng)作 // 參數(shù)是時(shí)間 // CCActionInterval * fadein = CCFadeIn::create(2); // sp->runAction(fadein); |
//CCFadeOut // 作用:創(chuàng)建1個(gè)漸變消失的動(dòng)作 // 參數(shù)是時(shí)間 // CCActionInterval * fadeout = CCFadeOut::create(2); // sp->runAction(fadeout); |
//CCTintTo作用:創(chuàng)建1個(gè)色采變化的消失動(dòng)作 // 參數(shù)1:色采變化的動(dòng)作 // 參數(shù)2 :紅色份量 // 參數(shù)3:藍(lán)色份量 // CCActionInterval * tinto = CCTintTo ::create(3, 255, 255, 0); // sp->runAction(tinto); |
// CCTintBy // 作用:創(chuàng)建1個(gè)色采變化的出現(xiàn)動(dòng)作 // 參數(shù)1:色采變化的動(dòng)作 // 參數(shù)2 :紅色份量 // 參數(shù)3:藍(lán)色份量 但是家了reverse就是 反向的 // CCActionInterval * tintby = CCTintBy::create(3, 0, 255, 255); // CCActionInterval * tintby1 = tintby->reverse(); // sp->runAction(tintby1); |
// CCBlink // 作用 :創(chuàng)建1額閃爍的動(dòng)作 // 參數(shù)1:閃爍完成的時(shí)間 // 參數(shù)2:閃爍的次數(shù) // CCActionInterval * blink = CCBlink ::create(3, 10); // sp->runAction(blink); |
// |